﻿/* ===== Stripe Quiz (fixed footer + styled button, minimal gap) ===== */

/* --- Tokens --- */
:root {
    --sq-side-pad: 1rem;
    --sq-btn-min-h: 44px;        /* touch target */
    --sq-footer-pad-v: 8px;      /* top padding inside footer */
    --sq-footer-safe: env(safe-area-inset-bottom, 0px);
}

.sq-container {
    background-color: white;
    border-radius: 16px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    height: 100dvh;
    max-width: 420px;
    margin: 0 auto;
    box-sizing: border-box;
    overflow: hidden;
    position: relative; /* anchor footer */
    padding: 0 var(--sq-side-pad); /* no bottom safe-area here */
}

.sq-body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;  /* let inner blocks fill width */
    justify-content: flex-start; /* ⬅️ critical: no vertical centering */
    width: 100%;
    overflow: hidden;
    max-height: 100%;

    /* only a thin buffer so content doesn't kiss the footer */
    padding-bottom: max(8px, var(--sq-footer-safe));
    box-sizing: border-box;
}

/* Kill stray bottom margins that create a big white band above the footer */
.sq-body > *:last-child { margin-bottom: 0 !important; }
.sq-body .options,
.sq-body .answers,
.sq-body .answer-grid,
.sq-body .choices,
.sq-body .mc-options,
.sq-body .question-wrapper,
.sq-body .content-wrapper { margin-bottom: 0 !important; }

/* Footer pinned at bottom, handles its own safe-area */
.sq-footer {
    position: fixed;
    left: 0; right: 0; bottom: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    .sq-footer {
    position: fixed;
    left: 0; right: 0; bottom: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: var(--sq-footer-pad-v) var(--sq-side-pad) var(--sq-footer-safe);
    text-align: center;
    background: linear-gradient(180deg, rgba(255,255,255,0) 0%, #fff 60%);
    z-index: 10;
}
    text-align: center;
    background: linear-gradient(180deg, rgba(255,255,255,0) 0%, #fff 60%);
    z-index: 10;
}

/* ---- Sensei Aya image ---- */
.sq-sensei-image {
    height: 120px;
    object-fit: contain;
    margin-bottom: 1rem;
    display: block;
    max-width: 100%;
}

/* ---- Interaction shield ---- */
.sq-interaction-shield {
    position: fixed;
    inset: 0;
    background: transparent;
    pointer-events: none;
    z-index: 900;
}
.sq-interaction-shield.active { pointer-events: all; }

/* ---- Read Question button (pill) ---- */
.read-question-button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: var(--sq-btn-min-h);
    padding: 10px 18px;
    border-radius: 999px; /* pill */
    border: none;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease;
    background: #5b9cff;
    color: #fff;
    line-height: normal;
    margin: 0; /* avoid phantom whitespace in footer */
}
.read-question-button:hover:enabled { background: #4786e6; transform: translateY(-1px); }
.read-question-button:active:enabled { transform: scale(0.98); }
.read-question-button:disabled { background: #a6c7f7; cursor: not-allowed; }
