/* NPC list parity styles from the GCW layout. */
.booklet-npc-search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
}

.booklet-npc-search-row > label,
.booklet-npc-search-row > button {
    border-radius: 5px !important;
}

.booklet-npc-search-row label button {
    border-radius: 4px !important;
}

.booklet-npc-table {
    table-layout: fixed;
}

.booklet-npc-table thead th {
    padding-top: 10px;
    padding-bottom: 10px;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}

.booklet-npc-table .booklet-uiv8-sort {
    min-height: 20px;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}

.booklet-npc-table-name-head,
.booklet-npc-table-name {
    width: 300px;
    min-width: 300px;
    max-width: 300px;
    padding-right: 10px;
    padding-left: 16px;
}

.booklet-npc-table tbody td:not(.booklet-npc-table-name) {
    font-size: 12px;
}

.booklet-npc-table tbody tr {
    height: 68px;
}

.booklet-npc-table-name {
    padding-top: 8px;
    padding-bottom: 8px;
}

.booklet-npc-avatar {
    display: flex;
    width: 50px;
    height: 50px;
    flex: 0 0 50px;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #f8fafc;
}

.booklet-npc-avatar-image {
    display: block;
    width: auto !important;
    height: auto !important;
    max-width: 43px !important;
    max-height: 43px !important;
    object-fit: contain;
}

.booklet-npc-avatar-fallback {
    color: #64748b;
    font-size: 25px;
}

.tw-dark .booklet-npc-avatar,
.dark .booklet-npc-avatar {
    border-color: #383838;
    background: #111;
}

.booklet-npc-column-menu {
    width: 330px;
}

.booklet-npc-column-menu .booklet-mob-column-grid {
    grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 1024px) {
    .booklet-npc-search-row {
        grid-template-columns: minmax(260px, 1fr) 110px;
    }
}

.booklet-npc-relation {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border-radius: 4px;
    padding: 3px 7px;
    font-size: 12px;
    line-height: 1.2;
    text-decoration: none;
}

.booklet-npc-relation.is-quest {
    background: #eef2ff;
    color: #4f46e5;
}

.booklet-npc-relation.is-shop {
    background: #ecfdf5;
    color: #047857;
}

.booklet-npc-relation:hover {
    filter: brightness(.97);
}

.booklet-npc-relation-empty {
    color: #94a3b8;
}

.booklet-npc-detail-layout {
    margin-top: 10px;
}

.booklet-npc-profile-icon img {
    max-width: 88px;
    max-height: 88px;
    object-fit: contain;
}

.booklet-npc-quest-row {
    border-radius: 0;
    box-shadow: none;
}

.booklet-npc-quest-row + .booklet-npc-quest-row {
    margin-top: -1px;
}

.tw-dark .booklet-npc-relation.is-quest,
.dark .booklet-npc-relation.is-quest {
    background: rgba(99, 102, 241, .16);
    color: #a5b4fc;
}

.tw-dark .booklet-npc-relation.is-shop,
.dark .booklet-npc-relation.is-shop {
    background: rgba(16, 185, 129, .14);
    color: #6ee7b7;
}
