/* css/hunter/characters.css */

/* =========================
   Hunter Characters
========================= */

.hunter-character-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.hunter-character-card {
    appearance: none;

    display: flex;
    flex-direction: column;
    align-items: center;

    width: 100%;
    padding: 16px 12px;
    border-radius: 18px;

    background: #ffffff;
    border: 1px solid #f3f4f6;

    text-align: center;
    font-family: inherit;
    cursor: pointer;

    transition:
        transform .16s ease,
        border-color .16s ease,
        box-shadow .16s ease,
        background .16s ease;
}

.hunter-character-card:hover {
    transform: translateY(-2px);
    border-color: #facc15;
    box-shadow: 0 8px 20px rgba(15, 23, 42, .08);
}

.hunter-character-card.selected {
    border-color: #f59e0b;
    background:
        radial-gradient(circle at top, rgba(251, 191, 36, .22), transparent 42%),
        linear-gradient(180deg, #fff7df, #ffffff);

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .95),
        0 0 0 2px rgba(245, 158, 11, .28),
        0 4px 0 #d97706,
        0 12px 24px rgba(15, 23, 42, .12);
}

.hunter-character-image {
    width: 180px;
    height: 180px;

    margin-bottom: 10px;

    object-fit: contain;
    image-rendering: pixelated;
}

.hunter-character-name {
    margin-bottom: 4px;

    color: #111827;
    font-size: 15px;
    font-weight: 900;
}

.hunter-character-card.selected .hunter-character-name::after {
    content: "已選擇";
    display: inline-flex;

    margin-left: 6px;
    padding: 2px 6px;
    border-radius: 999px;

    background: #fef3c7;
    color: #92400e;

    font-size: 11px;
    font-weight: 900;
}

.hunter-character-desc {
    max-width: 240px;

    color: #6b7280;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.5;
}


.hunter-character-card:focus {
    outline: none;
}

.hunter-character-card:focus-visible {
    outline: 3px solid rgba(59, 130, 246, .55);
    outline-offset: 3px;
}
/* =========================
   Hunter Roster v0.2.3
========================= */

.hunter-character-roster-details[open] summary::after {
    content: "收合";
}

.hunter-character-section {
    padding: 0 14px 14px;
}

.hunter-section-desc {
    margin: -4px 0 12px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.5;
}

.hunter-character-row {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.hunter-character-card {
    position: relative;
    overflow: hidden;
}

.hunter-character-card.is-locked {
    cursor: not-allowed;
    background: linear-gradient(180deg, #f9fafb, #ffffff);
    border-style: dashed;
    opacity: .74;
}

.hunter-character-card.is-locked:hover {
    transform: none;
    border-color: #e5e7eb;
    box-shadow: none;
}

.hunter-character-card.is-locked .hunter-character-image {
    filter: grayscale(1);
    opacity: .58;
}

.hunter-character-card.is-locked::before {
    content: "🔒";
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: rgba(17, 24, 39, .82);
    color: #ffffff;
    font-size: 14px;
}

.hunter-character-meta-row {
    min-height: 22px;
    margin-bottom: 4px;
}

.hunter-character-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 8px;
    border-radius: 999px;
    background: #fef3c7;
    color: #92400e;
    font-size: 11px;
    font-weight: 900;
}

.hunter-character-card.selected .hunter-character-status {
    background: #111827;
    color: #ffffff;
}

.hunter-character-card.is-locked .hunter-character-status {
    background: #e5e7eb;
    color: #6b7280;
}

.hunter-character-title,
.hunter-character-type {
    color: #92400e;
    font-size: 11px;
    font-weight: 900;
    line-height: 1.35;
}

.hunter-character-type {
    margin-bottom: 5px;
    color: #374151;
}

/* =========================
   Hunter roster compact v0.2.3-a
========================= */

.hunter-character-roster-details:not([open]) {
    margin-bottom: 12px;
}

.hunter-character-row {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 8px;
}

.hunter-character-card {
    padding: 10px 8px;
    border-radius: 14px;
}

.hunter-character-image {
    width: 96px;
    height: 96px;
    margin-bottom: 6px;
}

.hunter-character-meta-row {
    min-height: 20px;
    margin-bottom: 3px;
}

.hunter-character-name {
    margin-bottom: 2px;
    font-size: 14px;
}

.hunter-character-title,
.hunter-character-type {
    font-size: 10px;
}

.hunter-character-desc {
    display: none;
}

/* =========================
   Hunter character modal beta
========================= */

.hunter-character-open-btn {
    position: relative;
    padding: 0;
    border: 2px solid #f3d58b;
    cursor: pointer;
    font-family: inherit;
}

.hunter-character-open-btn:hover {
    transform: translateY(-1px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .95),
        0 3px 0 #d6a94f,
        0 10px 18px rgba(15, 23, 42, .12);
}

.hunter-character-open-btn:focus {
    outline: none;
}

.hunter-character-open-btn:focus-visible {
    outline: 3px solid rgba(245, 158, 11, .55);
    outline-offset: 3px;
}

.hunter-character-open-badge {
    position: absolute;
    right: -6px;
    bottom: -8px;
    z-index: 2;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 4px 8px;
    border-radius: 999px;

    background: #111827;
    color: #ffffff;
    border: 2px solid #ffffff;

    font-size: 11px;
    font-weight: 900;
    line-height: 1;
    box-shadow: 0 4px 10px rgba(15, 23, 42, .18);
}

.hunter-character-modal[hidden] {
    display: none !important;
}

.hunter-character-modal {
    position: fixed;
    inset: 0;
    z-index: 1100;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 18px;
}

.hunter-character-modal-backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(15, 23, 42, .58);
    cursor: pointer;
}

.hunter-character-modal-panel {
    position: relative;
    z-index: 1;

    width: min(620px, 100%);
    max-height: min(760px, calc(100dvh - 36px));
    overflow: auto;

    padding: 20px;
    border-radius: 24px;

    background:
        radial-gradient(circle at top left, rgba(251, 191, 36, .24), transparent 38%),
        linear-gradient(180deg, #fffdf5, #ffffff);
    border: 2px solid #f3d58b;

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .96),
        0 18px 44px rgba(15, 23, 42, .28);
}

.hunter-character-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;

    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 1px solid #f3d58b;

    background: #ffffff;
    color: #92400e;

    font-size: 22px;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
}

.hunter-character-modal-close:hover {
    background: #fffbeb;
}

.hunter-character-modal-kicker {
    margin-bottom: 4px;
    color: #92400e;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .08em;
}

.hunter-character-modal-title {
    margin: 0 42px 6px 0;
    color: #111827;
    font-size: 22px;
    font-weight: 900;
    line-height: 1.25;
}

.hunter-character-modal-desc {
    margin: 0 0 14px;
    color: #6b7280;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.6;
}

.hunter-character-modal-roster {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

body.hunter-character-modal-open {
    overflow: hidden;
}

@media (max-width: 640px) {
    .hunter-character-modal {
        align-items: flex-end;
        padding: 12px;
    }

    .hunter-character-modal-panel {
        width: 100%;
        max-height: min(720px, calc(100dvh - 24px));
        padding: 18px 14px 14px;
        border-radius: 22px;
    }

    .hunter-character-modal-roster {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .hunter-character-modal-roster .hunter-character-image {
        width: 104px;
        height: 104px;
    }
}
