/* Series Snapshot – premium teaser card */

.series-snapshot-module {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-bottom: 1.75rem;
}

.series-snapshot-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.series-snapshot-header .btn-xs {
    padding: 0.45rem 0.8rem;
    font-size: 0.75rem;
    border-radius: 999px;
    transition: all 0.2s ease;
}

.series-snapshot-header .btn-xs:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.series-snapshot-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Series Image (3:2 aspect ratio) with gradient overlay */
.series-image-container {
    width: 100%;
    aspect-ratio: 3 / 2;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 12px 32px -22px rgba(15, 23, 42, 0.6);
    position: relative;
}

.series-image-container::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.4), transparent);
    pointer-events: none;
}

.series-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Overview row */
.series-overview {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    padding: 0.85rem 0.85rem 0.85rem 1rem;
    border-radius: 14px;
    border: 1px solid rgba(59, 130, 246, 0.18);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.16), rgba(15, 118, 110, 0.08));
    box-shadow: 0 12px 28px -24px rgba(37, 99, 235, 0.5);
}

[data-bs-theme="dark"] .series-overview {
    border-color: rgba(59, 130, 246, 0.35);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.3), rgba(15, 118, 110, 0.18));
    box-shadow: 0 12px 32px -24px rgba(37, 99, 235, 0.65);
}

.series-overview-text {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.series-name {
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--theme-text-primary);
    letter-spacing: -0.01em;
}

.division-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--theme-text-secondary);
    letter-spacing: 0.02em;
}

.division-total {
    font-size: 0.85rem;
    color: var(--theme-text-muted);
    font-weight: 500;
}

.division-total strong {
    color: var(--theme-text-primary);
    font-weight: 700;
    font-size: 0.9rem;
}

.series-rank-chip {
    min-width: 88px;
    padding: 0.6rem 0.85rem;
    border-radius: 14px;
    border: 1.5px solid rgba(59, 130, 246, 0.25);
    background: var(--theme-surface-1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    text-align: center;
    box-shadow: 0 8px 24px -16px rgba(15, 23, 42, 0.6);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.series-rank-chip.rank-ready {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(37, 99, 235, 0.06));
    box-shadow: 0 12px 32px -20px rgba(37, 99, 235, 0.8), 0 0 0 1.5px rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.3);
}

.series-rank-chip.rank-pending {
    opacity: 0.65;
}

.series-rank-chip .chip-label {
    text-transform: uppercase;
    font-size: 0.62rem;
    letter-spacing: 0.12em;
    color: var(--theme-text-muted);
    font-weight: 600;
}

.series-rank-chip .chip-value {
    font-size: 1.65rem;
    line-height: 1;
    font-weight: 800;
    color: var(--theme-primary);
    text-shadow: 0 2px 10px rgba(37, 99, 235, 0.2);
}

/* Metric grid */
.series-snapshot-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.8rem;
}

.snapshot-metric {
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: var(--theme-surface-1);
    padding: 0.8rem 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    transition: all 0.25s ease;
    cursor: default;
}

.snapshot-metric:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px -14px rgba(15, 23, 42, 0.4);
    border-color: rgba(59, 130, 246, 0.15);
}

.metric-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 1rem;
    background: rgba(59, 130, 246, 0.12);
    color: var(--theme-primary);
    transition: all 0.25s ease;
    flex-shrink: 0;
}

.snapshot-metric:hover .metric-icon {
    transform: scale(1.05);
    background: rgba(59, 130, 246, 0.18);
}

[data-bs-theme="dark"] .metric-icon {
    background: rgba(59, 130, 246, 0.25);
}

[data-bs-theme="dark"] .snapshot-metric:hover .metric-icon {
    background: rgba(59, 130, 246, 0.35);
}

.metric-body {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 0;
}

.metric-label {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--theme-text-muted);
    font-weight: 600;
}

.metric-value {
    font-size: 1.3rem;
    line-height: 1;
    font-weight: 700;
    color: var(--theme-text-primary);
}

.trend-up .metric-icon {
    background: rgba(34, 197, 94, 0.15);
    color: var(--theme-success, #16a34a);
}

.trend-up:hover .metric-icon {
    background: rgba(34, 197, 94, 0.22);
}

.trend-down .metric-icon {
    background: rgba(239, 68, 68, 0.15);
    color: var(--theme-danger, #dc2626);
}

.trend-down:hover .metric-icon {
    background: rgba(239, 68, 68, 0.22);
}

.series-cashline {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.series-cash-pill {
    border-radius: 999px;
    padding: 0.7rem 1.1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid transparent;
    background: var(--theme-surface-2);
    color: var(--theme-text-primary);
    box-shadow: 0 8px 20px -22px rgba(15, 23, 42, 0.6);
    transition: all 0.3s ease;
}

.series-cash-pill.in-cash {
    background: rgba(34, 197, 94, 0.14);
    border-color: rgba(34, 197, 94, 0.25);
    color: var(--theme-success, #15803d);
}

.series-cash-pill.on-line {
    background: rgba(37, 99, 235, 0.15);
    border-color: rgba(37, 99, 235, 0.28);
    color: var(--theme-primary, #2563eb);
}

.series-cash-pill.out-of-cash {
    background: rgba(249, 115, 22, 0.15);
    border-color: rgba(249, 115, 22, 0.3);
    color: #c2410c;
    animation: subtle-pulse 3s ease-in-out infinite;
}

@keyframes subtle-pulse {
    0%, 100% {
        box-shadow: 0 8px 20px -22px rgba(249, 115, 22, 0.4);
    }
    50% {
        box-shadow: 0 8px 24px -18px rgba(249, 115, 22, 0.6);
    }
}

.series-cash-pill.neutral {
    border-color: rgba(15, 23, 42, 0.1);
    background: var(--theme-surface-1);
    box-shadow: none;
}

.series-cash-pill .points-needed {
    font-weight: 700;
    color: #ea580c;
    font-size: 0.92rem;
    padding-left: 0.25rem;
}

[data-bs-theme="dark"] .series-cash-pill .points-needed {
    color: #fb923c;
}

.series-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding-top: 0.25rem;
}

.series-meta-updated {
    font-size: 0.76rem;
    color: var(--theme-text-muted);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 500;
}

.series-meta-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.btn-xs {
    padding: 0.5rem 0.9rem;
    font-size: 0.78rem;
    border-radius: 999px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-xs:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

/* Force white text on primary buttons - gradient background needs light text */
.series-meta-actions .btn-theme-primary {
    color: #fff !important;
}

@media (max-width: 991.98px) {
    .series-snapshot-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .series-name {
        font-size: 1.1rem;
    }
}

@media (max-width: 767.98px) {
    .series-overview {
        flex-direction: column;
        gap: 0.75rem;
    }

    .series-rank-chip {
        align-self: flex-start;
    }

    .series-cash-pill {
        font-size: 0.85rem;
        padding: 0.65rem 1rem;
    }
}

@media (max-width: 575.98px) {
    .series-snapshot-module {
        gap: 1rem;
    }

    .series-snapshot-body {
        gap: 0.85rem;
    }

    .series-snapshot-metrics {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }

    .snapshot-metric {
        padding: 0.75rem 0.8rem;
    }

    .metric-value {
        font-size: 1.4rem;
    }

    .series-name {
        font-size: 1.05rem;
    }

    .series-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.6rem;
    }
}
