/* E3 Learning: the premium preview's sheet and days-left banner (js/premium-preview.js).
   Moved out of css/quiz-v3.css (V4 R72 WO-7): home, the dashboard and /account/preview.html open the sheet too and
   do not load the quiz styles, so every page that loads js/premium-preview.js loads this file
   (tests/unit/preview-landing.test.mjs checks it). */

/* ============================================================================
   PREMIUM PREVIEW SHEET AND DAYS-LEFT BANNER (js/premium-preview.js)
   A sheet that rises from the bottom on phones and sits centred on wider
   screens, opened only after an upgrade modal has closed.
   ============================================================================ */

.preview-sheet-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    z-index: 10001; /* above the mobile bottom nav (10000), like the upgrade modal */
    animation: upgradeOverlayIn 0.25s ease;
}

@keyframes previewSheetIn {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

.preview-sheet {
    background: var(--v2-bg-secondary, #1e293b);
    border: 1px solid var(--v2-border-subtle, #334155);
    border-radius: 20px 20px 0 0;
    width: 100%;
    max-width: 480px;
    max-height: calc(100vh - 1rem);
    max-height: calc(100dvh - 1rem);
    overflow-y: auto;
    overscroll-behavior: contain;
    box-sizing: border-box;
    padding: 1.75rem 1.25rem calc(1.25rem + env(safe-area-inset-bottom, 0px));
    animation: previewSheetIn 0.3s ease;
}

.preview-sheet:focus {
    outline: none;
}

.preview-sheet__icon {
    width: 48px;
    height: 48px;
    margin: 0 0 1rem;
    background: linear-gradient(135deg, var(--v2-accent-amber, #f59e0b), var(--quiz-accent-orange, #fb923c));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-sheet__icon i,
.preview-sheet__icon svg {
    width: 24px;
    height: 24px;
    color: #1a1a1a;
}

.preview-sheet__title {
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--v2-text-primary, #f1f5f9);
    margin: 0 0 0.6rem;
}

.preview-sheet__lead {
    font-size: 0.975rem;
    line-height: 1.6;
    color: var(--v2-text-secondary, #e2e8f0);
    margin: 0 0 1rem;
}

.preview-sheet__label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--v2-text-primary, #f1f5f9);
    margin: 0 0 0.5rem;
}

.preview-sheet__list {
    list-style: none;
    margin: 0 0 1rem;
    padding: 0;
}

.preview-sheet__list li {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.35rem 0;
    font-size: 0.9375rem;
    line-height: 1.5;
    color: var(--v2-text-secondary, #e2e8f0);
}

.preview-sheet__list li i,
.preview-sheet__list li svg {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin-top: 0.15rem;
    color: var(--v2-accent-green, #10b981);
}

.preview-sheet__note {
    font-size: 0.875rem;
    line-height: 1.55;
    color: var(--v2-text-muted, #94a3b8);
    margin: 0 0 1.25rem;
}

.preview-sheet__message {
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--v2-accent-amber, #f59e0b);
    margin: 0 0 1rem;
}

.preview-sheet__message[hidden] {
    display: none;
}

.preview-sheet__actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.preview-sheet__start {
    min-height: 48px;
    padding: 0.8rem 1.25rem;
    background: linear-gradient(135deg, var(--v2-accent-amber, #f59e0b), var(--quiz-accent-orange, #fb923c));
    color: #1a1a1a; /* dark text on amber, as on the upgrade modal's button */
    font-size: 1rem;
    font-weight: 700;
    font-family: inherit;
    border: none;
    border-radius: var(--v2-radius-lg, 12px);
    cursor: pointer;
}

.preview-sheet__start[disabled] {
    cursor: progress;
    opacity: 0.75;
}

.preview-sheet__start[hidden] {
    display: none;
}

.preview-sheet__decline {
    min-height: 44px;
    background: none;
    border: none;
    color: var(--v2-text-muted, #94a3b8);
    font-size: 0.9rem;
    font-family: inherit;
    cursor: pointer;
    padding: 0.5rem 1rem;
}

.preview-sheet__decline:hover {
    color: var(--v2-text-primary, #f1f5f9);
}

@media (min-width: 640px) {
    .preview-sheet-overlay {
        align-items: center;
        padding: 1rem;
    }

    .preview-sheet {
        border-radius: 20px;
        padding: 2rem;
    }
}

.preview-banner {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
    margin: 0.75rem 1rem 0;
    padding: 0.75rem 1rem;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.35);
    border-radius: var(--v2-radius-lg, 12px);
    color: var(--v2-text-secondary, #e2e8f0);
}

.preview-banner[hidden] {
    display: none;
}

.preview-banner i,
.preview-banner svg {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    color: var(--v2-accent-amber, #f59e0b);
}

.preview-banner__text {
    flex: 1 1 14rem;
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
}

.preview-banner__text strong {
    color: var(--v2-text-primary, #f1f5f9);
}

.preview-banner__link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--v2-accent-amber, #f59e0b);
    text-decoration: underline;
}

/* The Premium week guide (WO-11; js/premium-preview.js): the banner's next step, the one-line notes at the
   moment and the hub tiles' tag. */
.preview-banner__next {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--v2-text-primary, #f1f5f9);
    text-decoration: underline;
}

.preview-note {
    margin: 0.5rem 1rem 0;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--v2-text-secondary, #e2e8f0);
}

.preview-note__action {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-weight: 600;
    color: var(--v2-accent-amber, #f59e0b);
    text-decoration: underline;
}

.preview-week-tag {
    display: inline-block;
    margin-top: 0.4rem;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.5;
    color: var(--v2-accent-amber, #f59e0b);
    background: rgba(245, 158, 11, 0.12);
}
