/* Shared design-system components — used across pages. */

/* ── Dev "Act As" banner — only rendered when DEBUG + override active ───── */

.dev-act-as-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    padding: 0.5rem 1rem;
    font-family: 'Figtree', sans-serif;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #111827;
    background-color: #f59e0b;
    text-align: center;
}

.dev-act-as-banner i {
    font-size: 1rem;
}

.dev-act-as-banner a {
    color: #111827;
    font-weight: 700;
    text-decoration: underline;
}

.dev-act-as-banner a:hover,
.dev-act-as-banner a:focus {
    color: #111827;
    text-decoration: none;
}

body {
    min-height: 100vh;
    background-color: var(--bg-dark);
    color: var(--text-primary);
}

/* ── Site Navigation ─────────────────────────────────────────────────────── */

.site-nav {
    height: 58px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1030;
    display: flex;
    align-items: center;
}

.site-nav-inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0 1rem;
}

.site-nav-left {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.site-nav-center {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.nav-public-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.nav-public-link:hover {
    color: var(--primary-light);
}

.site-nav-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-sidebar-toggle {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.nav-sidebar-toggle:hover {
    background: var(--bg-card);
    color: var(--text-secondary);
    border-color: rgba(255, 255, 255, 0.15);
}

@media (min-width: 768px) {
    .nav-sidebar-toggle {
        display: none;
    }
}

.site-nav-brand {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.05rem;
    /* stylelint-disable-next-line declaration-no-important -- overrides bootstrap nav link color */
    color: var(--text-primary) !important;
    text-decoration: none;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.site-nav-brand i {
    color: #60a5fa;
    font-size: 1.1rem;
}

.site-nav-brand:hover {
    /* stylelint-disable-next-line declaration-no-important -- overrides bootstrap nav link color */
    color: white !important;
}

.nav-user-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.65rem 0.25rem 0.25rem;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: 'Outfit', sans-serif;
}

.nav-user-btn::after {
    display: none;
}

.nav-user-btn:hover,
.nav-user-btn[aria-expanded="true"] {
    border-color: rgba(255, 255, 255, 0.18);
    background: var(--bg-card);
    color: var(--text-primary);
}

.nav-user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.nav-user-initial {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--twitch));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 0.78rem;
    flex-shrink: 0;
}

.nav-user-name {
    font-size: 0.875rem;
    font-weight: 500;
}

.nav-chevron {
    font-size: 0.6rem;
    color: var(--text-muted);
    transition: transform 0.2s ease;
}

.nav-user-btn[aria-expanded="true"] .nav-chevron {
    transform: rotate(180deg);
}

.nav-login-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 1rem;
    border-radius: 999px;
    background: rgba(145, 71, 255, 0.15);
    border: 1px solid rgba(145, 71, 255, 0.35);
    color: var(--accent-purple);
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.nav-login-btn:hover {
    background: rgba(145, 71, 255, 0.25);
    border-color: var(--accent-purple);
    color: #e9d5ff;
}

/* ── Site Footer ─────────────────────────────────────────────────────────── */

.site-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 2.5rem 0 1.5rem;
}

.site-footer-inner {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.site-footer-brand {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.site-footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.site-footer-logo i {
    color: #60a5fa;
}

.site-footer-tagline {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin: 0;
}

.site-footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.site-footer-col {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.site-footer-col-heading {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.site-footer-col a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s;
}

.site-footer-col a:hover {
    color: var(--primary-light);
}

.site-footer-social {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.site-footer-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    text-decoration: none;
    transition: color 0.2s, background 0.2s, border-color 0.2s;
}

.site-footer-social-link:hover,
.site-footer-social-link:focus-visible {
    color: var(--primary-light);
    background: rgba(96, 165, 250, 0.12);
    border-color: rgba(96, 165, 250, 0.4);
}

.site-footer-social-link i {
    font-size: 1.1rem;
    line-height: 1;
}

.site-footer-social-link svg {
    width: 1.05rem;
    height: 1.05rem;
    display: block;
}

.site-footer-copy {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin: 0;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    color: white;
}

.btn-success {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.btn-success:hover {
    background-color: var(--secondary-dark);
    border-color: var(--secondary-dark);
}

.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.card-title {
    color: var(--text-primary);
}

.card-text {
    color: var(--text-secondary);
}

.clip-card {
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.clip-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.25), 0 0 0 1px rgba(96, 165, 250, 0.15);
}

.clip-thumbnail {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 4px;
    background-color: var(--bg-secondary);
}

footer {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    margin-top: auto;
    padding: 2rem 0;
}

.text-muted {
    /* stylelint-disable-next-line declaration-no-important -- overrides bootstrap utility */
    color: var(--text-muted) !important;
}

a {
    color: var(--primary-light);
    text-decoration: none;
}

a:hover {
    color: var(--primary-color);
}

.badge {
    background-color: var(--accent-color);
    color: var(--bg-dark);
}

.form-control,
.form-select {
    background-color: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

.form-control:focus,
.form-select:focus {
    background-color: var(--bg-secondary);
    border-color: var(--primary-color);
    color: var(--text-primary);
    box-shadow: 0 0 0 0.25rem rgba(37, 99, 235, 0.25);
}

.form-label {
    color: var(--text-secondary);
}


/* Dropdown Menu Styling */
.dropdown-menu {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.dropdown-item {
    color: var(--text-secondary);
    transition: background-color 0.2s;
}

.dropdown-item:hover {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

.dropdown-divider {
    border-color: var(--border-color);
}

/* Content Wrapper - contains sidebar and main content */
.content-wrapper {
    position: relative;
}

/* ============================================================
   Sidebar
   ============================================================ */

.sidebar {
    width: 248px;
    background-color: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

/* Mobile: sidebar is hidden and positioned fixed when toggled */
@media (max-width: 767px) {
    .sidebar {
        position: fixed;
        top: 0;
        left: -248px;
        height: 100vh;
        z-index: 1060;
        transition: left 0.28s ease;
    }

    .sidebar.active {
        left: 0;
    }
}

/* Tablet and above: sidebar is always visible */
@media (min-width: 768px) {
    .sidebar {
        position: relative;
    }
}

/* --- User Profile --- */
.sb-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.1rem 1rem;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.sb-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}

.sb-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.1);
    display: block;
}

.sb-avatar-placeholder {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
}

.sb-online-pip {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--secondary-color);
    border: 2px solid var(--bg-secondary);
}

.sb-user-info {
    flex: 1;
    min-width: 0;
}

.sb-username {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 0.875rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.sb-followers {
    font-family: 'Figtree', sans-serif;
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

/* --- Navigation --- */
.sb-nav {
    padding: 0.75rem 0.5rem;
    flex: 1;
}

.sb-nav-label {
    display: block;
    font-family: 'Outfit', sans-serif;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    padding: 0.5rem 0.6rem 0.4rem;
    opacity: 0.6;
}

.sb-link {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-family: 'Figtree', sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    transition: background-color 0.15s ease, color 0.15s ease;
    margin-bottom: 1px;
}

.sb-link:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    text-decoration: none;
}

.sb-link--active {
    background-color: rgba(37, 99, 235, 0.14);
    color: var(--primary-light);
    font-weight: 600;
}

.sb-link--active:hover {
    background-color: rgba(37, 99, 235, 0.18);
    color: var(--primary-light);
}

.sidebar--viewer .sb-link--active {
    background-color: rgba(245, 158, 11, 0.14);
    color: var(--accent-color);
}

.sidebar--viewer .sb-link--active:hover {
    background-color: rgba(245, 158, 11, 0.18);
    color: var(--accent-color);
}

.sidebar--viewer .sb-link--active .sb-link-icon {
    color: var(--accent-color);
}

.sb-link-icon {
    font-size: 1rem;
    width: 18px;
    text-align: center;
    flex-shrink: 0;
    opacity: 0.85;
}

.sb-link--active .sb-link-icon {
    opacity: 1;
}

.sb-nav--dev {
    flex: 0 0 auto;
    border-top: 1px dashed rgba(245, 158, 11, 0.25);
    padding-top: 0.75rem;
    margin-top: 0.5rem;
}

.sb-link--dev {
    color: var(--accent-color);
}

.sb-link--dev:hover,
.sb-link--dev:focus {
    background-color: rgba(245, 158, 11, 0.10);
    color: var(--accent-color);
}

.sb-link--dev .sb-link-icon {
    color: var(--accent-color);
    opacity: 0.95;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 1050;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Hide overlay on tablet and above */
@media (min-width: 768px) {
    .sidebar-overlay {
        display: none;
    }
}


/* Viewer Progress Bar */
.viewer-progress {
    position: relative;
    height: 12px;
    background-color: var(--bg-secondary);
    border-radius: 999px;
    overflow: hidden;
    width: 100%;
    border: 1px solid var(--border-color);
}

.viewer-progress__bar {
    height: 100%;
    width: var(--p, 0%);
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    border-radius: 999px;
    transition: width 300ms ease;
}

.viewer-progress-label {
    position: absolute;
    top: -32px;
    transform: translateX(-50%);
    transition: left 300ms ease;
}

.viewer-progress-label .badge {
    font-size: 0.875rem;
    padding: 0.35rem 0.65rem;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

/* Alpha Callout Banner */
.alpha-callout {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.15) 0%, rgba(16, 185, 129, 0.15) 100%);
    border: 1px solid rgba(37, 99, 235, 0.3);
    border-radius: 12px;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

.alpha-callout::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.alpha-callout-badge {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
}

.alpha-callout-content {
    color: var(--text-primary);
}

.alpha-callout-title {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.alpha-callout-text {
    color: var(--text-secondary);
    margin-bottom: 0;
    line-height: 1.6;
}

/* ── Shared Page Header (ph-*) ───────────────────────────────────────────── */

.ph-header {
    position: relative;
    overflow: hidden;
    padding: 2.5rem 0 2rem;
    background: linear-gradient(165deg, var(--bg-secondary) 0%, var(--bg-dark) 65%);
    border-bottom: 1px solid var(--border-color);
}

.ph-glow {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.ph-inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.ph-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Icon tile (tool pages) */
.ph-icon-tile {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 12px;
    border: 1px solid;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
}

/* Avatar (personal pages) */
.ph-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
    flex-shrink: 0;
}

.ph-avatar-placeholder {
    background: linear-gradient(135deg, var(--primary-color), var(--twitch));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.6rem;
    box-shadow: 0 0 0 4px rgba(145, 71, 255, 0.15);
}

.ph-text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.ph-title {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(1.4rem, 3.5vw, 1.9rem);
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.2;
}

.ph-subtitle {
    font-family: 'Figtree', sans-serif;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

.ph-meta {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-family: 'Figtree', sans-serif;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.1rem;
}

.ph-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.ph-name-gradient {
    background: linear-gradient(95deg, #93c5fd 0%, #38bdf8 55%, var(--success-fg) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Page header compact stage strip (DTF-02) */
.ph-stage-strip {
    flex-basis: 100%;
    width: 100%;
    margin-top: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.ph-stage-row {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    flex-wrap: wrap;
}

.ph-stage-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    border-radius: 999px;
    background: rgba(96, 165, 250, 0.15);
    border: 1px solid var(--primary-light);
    color: var(--primary-light);
    font-family: 'Figtree', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
}

.ph-stage-stats {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    flex-wrap: wrap;
}

.ph-stage-stat {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.ph-stage-stat-num {
    font-family: 'Outfit', sans-serif;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-primary);
}

.ph-stage-stat-label {
    font-family: 'Figtree', sans-serif;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.ph-stage-stat-divider {
    width: 1px;
    height: 18px;
    background: var(--border-color);
}

.ph-stage-spacer {
    flex: 1 1 auto;
}

.ph-stage-next-label {
    font-family: 'Figtree', sans-serif;
    font-size: 0.6875rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.ph-stage-progress {
    position: relative;
    width: 100%;
    height: 5px;
    background: var(--bg-secondary);
    border-radius: 999px;
    overflow: hidden;
}

.ph-stage-progress .stage-progress-fill {
    height: 100%;
    width: 0;
    background: var(--primary-color);
    border-radius: 999px;
    transition: width 0.6s ease;
}

@media (max-width: 575.98px) {
    .ph-stage-row {
        gap: 0.5rem;
    }

    .ph-stage-spacer {
        display: none;
    }

    .ph-stage-next-label {
        flex-basis: 100%;
    }
}

/* Shared page body — use alongside Bootstrap .container on every page */
.page-body {
    padding-top: 1.75rem;
    padding-bottom: 3rem;
}


/* Spin animation (shared) */
.spinning {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* Skeleton Loading Styles */
.skeleton {
    background: linear-gradient(90deg,
            var(--bg-secondary) 25%,
            rgba(148, 163, 184, 0.15) 50%,
            var(--bg-secondary) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
}

.skeleton-circle {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    flex-shrink: 0;
}

.skeleton-text {
    height: 1rem;
    width: 100%;
}

.skeleton-text-sm {
    height: 0.75rem;
    width: 80%;
}

@keyframes skeleton-loading {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.min-width-0 {
    min-width: 0;
}

@media (max-width: 767px) {
    .set-community-btn {
        font-size: 0.7rem;
        padding: 0.35rem 0.55rem;
    }
}

/* Modal styling for dark theme */
.modal-content {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
}

.modal-header {
    border-bottom-color: var(--border-color);
}

.modal-footer {
    border-top-color: var(--border-color);
}

.btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* Alert link styling for dark theme */
.alert-warning a {
    color: #ffc107;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.alert-warning a:hover {
    color: #ffda6a;
}

.alert-info a {
    color: #0dcaf0;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.alert-info a:hover {
    color: #6edff6;
}


/* ============================================================
   Stream Card — sc-* styles
   ============================================================ */

.sc-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.sc-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.14);
}

.sc-card--raided {
    border-color: rgba(139, 92, 246, 0.7);
    box-shadow: 0 0 0 1px rgba(139, 92, 246, 0.25);
}

.sc-card--raided:hover {
    border-color: rgba(139, 92, 246, 0.9);
}

/* --- Thumbnail --- */
.sc-thumb-wrap {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--bg-secondary);
    flex-shrink: 0;
}

.sc-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.sc-card:hover .sc-thumb {
    transform: scale(1.04);
}

.sc-thumb-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        transparent 50%,
        rgba(0, 0, 0, 0.65) 100%
    );
    pointer-events: none;
}

/* LIVE badge */
.sc-live-badge {
    position: absolute;
    top: 0.6rem;
    left: 0.6rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.55rem;
    background: rgba(239, 68, 68, 0.9);
    border-radius: 5px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #fff;
    backdrop-filter: blur(4px);
}

.sc-live-pip {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.5);
    animation: sc-pip-pulse 2s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes sc-pip-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.5); }
    60% { box-shadow: 0 0 0 4px rgba(255, 255, 255, 0); }
}

/* Viewer count badge */
.sc-viewer-badge {
    position: absolute;
    bottom: 0.55rem;
    right: 0.55rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.55rem;
    background: rgba(0, 0, 0, 0.65);
    border-radius: 5px;
    font-family: 'Figtree', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
}

.sc-viewer-badge i {
    font-size: 0.68rem;
    opacity: 0.75;
}

/* --- Body --- */
.sc-body {
    padding: 0.9rem 1rem 0.65rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.sc-username {
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.sc-game {
    font-family: 'Figtree', sans-serif;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--primary-light);
    display: flex;
    align-items: center;
    gap: 0.3rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sc-game i {
    font-size: 0.72rem;
    flex-shrink: 0;
    opacity: 0.8;
}

.sc-title {
    font-family: 'Figtree', sans-serif;
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sc-raid-history {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-family: 'Figtree', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    color: #a78bfa;
    margin-top: 0.1rem;
}

.sc-raid-history i {
    font-size: 0.68rem;
    flex-shrink: 0;
}

/* --- Footer --- */
.sc-footer {
    display: flex;
    gap: 0.5rem;
    padding: 0.65rem 0.75rem 0.75rem;
    border-top: 1px solid var(--border-color);
}

.sc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    flex: 1;
    padding: 0.5rem 0.6rem;
    border-radius: 8px;
    font-family: 'Figtree', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
    white-space: nowrap;
}

.sc-btn:hover {
    text-decoration: none;
    transform: translateY(-1px);
}

.sc-btn--watch {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.sc-btn--watch:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.18);
}

.sc-btn--raid {
    background: var(--primary-color);
    color: #fff;
}

.sc-btn--raid:hover {
    background: var(--primary-dark);
    color: #fff;
}


/* ============================================================
   Category Picker — cp-* styles
   ============================================================ */

.cp-hidden {
    /* stylelint-disable-next-line declaration-no-important -- utility class needs to override any display */
    display: none !important;
}

/* --- Root --- */
.cp-root {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

/* --- Selected area --- */
.cp-selected {
    padding: 0.8rem 0.9rem;
    background: rgba(37, 99, 235, 0.05);
    border: 1px solid rgba(37, 99, 235, 0.14);
    border-radius: 10px;
}

.cp-selected-label {
    display: block;
    font-family: 'Figtree', sans-serif;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--primary-light);
    margin-bottom: 0.55rem;
}

.cp-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

/* Chip */
.cp-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.3rem 0.2rem 0.45rem;
    background: rgba(37, 99, 235, 0.12);
    border: 1px solid rgba(37, 99, 235, 0.25);
    border-radius: 6px;
    animation: cp-chip-in 0.18s ease;
}

@keyframes cp-chip-in {
    from { opacity: 0; transform: scale(0.88); }
    to   { opacity: 1; transform: scale(1); }
}

.cp-chip-art {
    width: 16px;
    height: 22px;
    object-fit: cover;
    border-radius: 2px;
    flex-shrink: 0;
}

.cp-chip-name {
    font-family: 'Figtree', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary-light);
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cp-chip-remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    padding: 0;
    background: none;
    border: none;
    color: var(--primary-light);
    cursor: pointer;
    border-radius: 3px;
    font-size: 0.9rem;
    opacity: 0.55;
    transition: opacity 0.12s ease, background-color 0.12s ease, color 0.12s ease;
    flex-shrink: 0;
    line-height: 1;
}

.cp-chip-remove:hover {
    opacity: 1;
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

/* --- Search bar --- */
.cp-search-wrap {
    /* no extra margin; gap on root handles spacing */
}

.cp-search-inner {
    display: flex;
    align-items: center;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0 0.5rem 0 0.85rem;
    gap: 0.5rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.cp-search-inner:focus-within {
    border-color: rgba(37, 99, 235, 0.45);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.cp-search-icon {
    color: var(--text-muted);
    font-size: 0.85rem;
    flex-shrink: 0;
}

.cp-search-input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-family: 'Figtree', sans-serif;
    font-size: 0.9rem;
    padding: 0.7rem 0;
    min-width: 0;
}

.cp-search-input::placeholder {
    color: var(--text-muted);
}

.cp-clear-btn {
    flex-shrink: 0;
    padding: 0.25rem 0.5rem;
    margin-right: 0.25rem;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1;
    cursor: pointer;
    border-radius: 4px;
    transition: color 0.15s ease, background-color 0.15s ease;
}

.cp-clear-btn:hover {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.06);
}

.cp-clear-btn:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 1px;
}

.cp-search-btn {
    flex-shrink: 0;
    padding: 0.35rem 0.9rem;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 7px;
    font-family: 'Figtree', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s ease;
    white-space: nowrap;
}

.cp-search-btn:hover {
    background: var(--primary-dark);
}

/* --- Loading --- */
.cp-loading {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.5rem 0;
    font-family: 'Figtree', sans-serif;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.cp-loading-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid var(--border-color);
    border-top-color: var(--primary-light);
    border-radius: 50%;
    animation: cp-spin 0.65s linear infinite;
    flex-shrink: 0;
}

@keyframes cp-spin {
    to { transform: rotate(360deg); }
}

/* --- Error --- */
.cp-error {
    padding: 0.6rem 0.85rem;
    background: rgba(239, 68, 68, 0.07);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 8px;
    font-family: 'Figtree', sans-serif;
    font-size: 0.82rem;
    color: #f87171;
}

/* --- Results list --- */
.cp-results {
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.cp-results:empty {
    border: none;
}

.cp-result-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 0.875rem;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.1s ease;
    cursor: pointer;
}

.cp-result-item:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: -2px;
}

.cp-result-item:last-child {
    border-bottom: none;
}

.cp-result-item:hover {
    background: rgba(37, 99, 235, 0.05);
}

.cp-result-art {
    width: 34px;
    height: 46px;
    flex-shrink: 0;
    border-radius: 4px;
    overflow: hidden;
    background: var(--bg-card);
}

.cp-result-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cp-result-name {
    flex: 1;
    font-family: 'Figtree', sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cp-result-add {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(37, 99, 235, 0.1);
    border: 1px solid rgba(37, 99, 235, 0.22);
    border-radius: 7px;
    color: var(--primary-light);
    font-size: 1rem;
    cursor: pointer;
    padding: 0;
    transition: background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease, transform 0.1s ease;
    line-height: 1;
}

.cp-result-add:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
    transform: scale(1.1);
}

/* --- No results --- */
.cp-no-results {
    padding: 0.9rem 1rem;
    text-align: center;
    font-family: 'Figtree', sans-serif;
    font-size: 0.83rem;
    color: var(--text-muted);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
}


/* ============================================================
   Skeleton Loading — sk-* styles
   ============================================================ */

@keyframes sk-shimmer {
    0%   { background-position: -600px 0; }
    100% { background-position:  600px 0; }
}

.sk-block,
.sk-line,
.sk-btn {
    background: linear-gradient(
        90deg,
        var(--bg-secondary) 25%,
        var(--border-color) 50%,
        var(--bg-secondary) 75%
    );
    background-size: 1200px 100%;
    animation: sk-shimmer 1.6s linear infinite;
    border-radius: 6px;
}

/* Fills the full thumbnail area on skeleton cards */
.sc-card--skeleton .sc-thumb-wrap.sk-block {
    border-radius: 0;
    height: 100%;
}

/* Text-row skeletons */
.sk-line {
    height: 12px;
    margin-bottom: 6px;
}

.sk-line--name  { width: 55%; height: 14px; }
.sk-line--game  { width: 40%; }
.sk-line--title { width: 80%; }

/* Button skeletons */
.sk-btn {
    flex: 1;
    height: 34px;
    border-radius: 8px;
}

/* Loading status pill */
.rf-status-pill--loading {
    background: rgba(148, 163, 184, 0.08);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
}

.rf-loading-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--text-muted);
    opacity: 0.6;
    animation: sk-shimmer 1.6s linear infinite;
    flex-shrink: 0;
}


/* ============================================================
   Shared Filter Bar & Card Enhancements — cf-filter-*, sc-card__*
   Used by both Raid Finder and Community Finder pages.
   ============================================================ */

/* ── Filter bar ───────────────────────────────── */
.cf-filter-bar {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 8px;
}

.cf-filter-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.cf-filter-label {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    white-space: nowrap;
}

.cf-filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* ── Filter chips ─────────────────────────────── */
.cf-filter-chip {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    border-radius: 99px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    background: rgba(255, 255, 255, 0.05);
    color: #64748b;
    border: 1px solid rgba(255, 255, 255, 0.08);
    user-select: none;
}

.cf-filter-chip input {
    display: none;
}

.cf-filter-chip--active {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.cf-filter-chip:hover:not(.cf-filter-chip--active) {
    background: rgba(255, 255, 255, 0.08);
    color: #94a3b8;
}

/* ── Clear filters button ─────────────────────── */
.cf-filter-clear {
    background: none;
    border: none;
    color: var(--primary-light);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    align-self: flex-start;
}

.cf-filter-clear:hover {
    color: #fff;
}

/* ── Card border highlights (saved > following) ── */
.sc-card--saved {
    border-color: rgba(245, 158, 11, 0.7);
    box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.25);
}

.sc-card--following {
    border-color: rgba(16, 185, 129, 0.7);
    box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.25);
}

/* ── Card name row (username + following badge) ── */
.sc-card__name-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ── Following badge ──────────────────────────── */
.sc-card__following-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 7px;
    border-radius: 99px;
    font-size: 10px;
    font-weight: 500;
    color: var(--secondary-color);
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.4);
    white-space: nowrap;
}

.sc-card__following-badge i {
    font-size: 9px;
}

/* ── Favorite button ──────────────────────────── */
.sc-card__favorite-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    min-height: 34px;
    height: 100%;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: transparent;
    color: #64748b;
    cursor: pointer;
    transition: all 0.15s ease;
    flex-shrink: 0;
    font-size: 16px;
}

.sc-card__favorite-btn:hover {
    color: var(--accent-color);
    border-color: rgba(245, 158, 11, 0.3);
}

.sc-card__favorite-btn--active {
    color: var(--accent-color);
}

.sc-card__favorite-btn--active:hover {
    color: var(--warning-fg);
}

/* ── Tag badges on cards ──────────────────────── */
.sc-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.sc-card__tag-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 600;
    color: var(--primary-light);
    background: rgba(37, 99, 235, 0.25);
    border: 1px solid rgba(96, 165, 250, 0.5);
}

/* ── Feedback box ─────────────────────────────── */
.fb-box {
    margin: 16px 0;
}

.fb-box-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--primary-light);
    background: rgba(37, 99, 235, 0.12);
    border: 1px solid rgba(96, 165, 250, 0.35);
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.fb-box-toggle:hover {
    background: rgba(37, 99, 235, 0.22);
    border-color: rgba(96, 165, 250, 0.6);
}

.fb-box-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    border-radius: 10px;
    background: var(--bg-panel);
    border: 1px solid rgba(96, 165, 250, 0.25);
}

.fb-box-prompt {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-light);
}

.fb-box-textarea {
    width: 100%;
    min-height: 80px;
    padding: 10px 12px;
    border-radius: 8px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    font-size: 14px;
    resize: vertical;
}

.fb-box-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.25);
}

.fb-box-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.fb-box-cancel,
.fb-box-submit {
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
}

.fb-box-cancel {
    background: transparent;
    color: #9ca3af;
    border-color: rgba(156, 163, 175, 0.3);
}

.fb-box-cancel:hover {
    color: #e5e7eb;
    border-color: rgba(229, 231, 235, 0.5);
}

.fb-box-submit {
    background: var(--primary-color);
    color: #ffffff;
}

.fb-box-submit:hover {
    background: var(--primary-dark);
}

.fb-box-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.fb-box-status {
    font-size: 13px;
    color: #9ca3af;
}

.fb-box-status[data-tone="success"] {
    color: var(--secondary-color);
}

.fb-box-status[data-tone="error"] {
    color: #f87171;
}