/* ========================================
   ALL SERIES CHARACTERS PAGE
   Loaded only on: /series/{slug}/characters/
   ======================================== */

.chars-page-header {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e3e5e8;
}

.chars-page-header h1 {
    font-size: 1.8em;
    font-weight: 800;
    color: #5865F2;
    margin: 0 0 10px 0;
    line-height: 1.2;
}

.mobile-filter-toggle {
    width: 100%;
    padding: 14px 20px;
    background: #5865F2;
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 1em;
    cursor: pointer;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(88, 101, 242, 0.3);
}

.mobile-filter-toggle svg {
    transition: transform 0.3s;
}

.mobile-filter-toggle.active svg {
    transform: rotate(180deg);
}

.filter-wrapper {
    margin-bottom: 20px;
}

.filter-box {
    background: white;
    border-radius: 10px;
    padding: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid #e3e5e8;
    display: none;
}

.filter-box.active {
    display: block;
}

.filter-group {
    margin-bottom: 10px;
}

.filter-group label {
    display: block;
    font-weight: 600;
    font-size: 0.75em;
    color: #4E545A;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-group input[type="text"] {
    width: 100%;
    padding: 7px 10px;
    border: 2px solid #e3e5e8;
    border-radius: 7px;
    font-size: 0.85em;
}

.gender-filters {
    display: flex;
    gap: 5px;
    overflow-x: auto;
}

.filter-radio-btn {
    flex: 1;
    min-width: fit-content;
    padding: 6px 10px;
    background: #f2f3f5;
    border: 2px solid transparent;
    border-radius: 7px;
    cursor: pointer;
    font-size: 0.8em;
    font-weight: 600;
    text-align: center;
    transition: all 0.2s;
    white-space: nowrap;
}

.filter-radio-btn.active {
    background: #5865F2;
    color: white;
    border-color: #5865F2;
}

.filter-radio-btn input {
    display: none;
}

.role-filters {
    display: flex;
    gap: 5px;
}

.filter-checkbox-btn {
    flex: 1;
    padding: 6px 8px;
    background: #f2f3f5;
    border: 2px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: all 0.2s;
    color: #4E545A;
}

.filter-checkbox-btn:has(input:checked) {
    background: #5865F2;
    color: white;
    border-color: #5865F2;
}

.filter-checkbox-btn input[type="checkbox"] {
    display: none;
}

.reset-btn {
    width: 100%;
    padding: 7px;
    background: #f2f3f5 !important;
    color: #2E3338 !important;
    border: 2px solid #e3e5e8 !important;
    border-radius: 7px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.82em;
    box-shadow: none !important;
    transition: background 0.2s, border-color 0.2s;
}

.reset-btn:hover {
    background: #e3e5e8 !important;
    border-color: #ccc !important;
    color: #2E3338 !important;
    box-shadow: none !important;
}

.results-header {
    background: white;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.results-title {
    font-size: 1.4em;
    font-weight: 700;
    color: #2E3338;
    margin: 0 0 8px 0;
    line-height: 1.2;
}

.results-count {
    font-size: 0.9em;
    color: #747F8D;
}

.load-more-container {
    text-align: center;
    margin-top: 30px;
    padding: 20px;
}

.load-more-btn {
    padding: 14px 32px;
    background: #5865F2;
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 1em;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(88, 101, 242, 0.3);
}

.load-more-btn:hover {
    background: #4752C4;
}

#no-results {
    text-align: center;
    padding: 40px 20px;
    display: none;
}

/* ── Desktop ─────────────────────────────────────────── */

@media (min-width: 969px) {
    .chars-page-header h1 {
        font-size: 2.8em;
    }
    .mobile-filter-toggle {
        display: none !important;
    }
    .chars-wrapper {
        display: flex;
        gap: 30px;
    }
    .filter-wrapper {
        flex: 0 0 220px;
        position: sticky;
        top: 20px;
        align-self: flex-start;
    }
    /* Always show filter box on desktop — override the mobile hide */
    .filter-box {
        display: block !important;
        padding: 14px;
    }
    .filter-group {
        margin-bottom: 12px;
    }
    .filter-group label {
        font-size: 0.78em;
        margin-bottom: 6px;
    }
    .filter-group input[type="text"] {
        padding: 8px 10px;
        font-size: 0.88em;
    }
    .gender-filters {
        flex-direction: column;
        gap: 6px;
    }
    .filter-radio-btn {
        padding: 7px 10px;
        font-size: 0.85em;
    }
    .filter-radio-btn input {
        display: inline-block;
        margin-right: 8px;
        width: 14px;
        height: 14px;
    }
    .role-filters {
        flex-direction: column;
        gap: 6px;
    }
    .chars-main {
        flex: 1;
        min-width: 0;
    }
    .results-header {
        padding: 20px;
        margin-bottom: 30px;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    .results-title {
        font-size: 2em;
        margin: 0;
    }
    .results-count {
        font-size: 1em;
    }
}
