/* ============================================================
   Welcome screen — Betify Lesotho self-service kiosk.
   Rebuilt from Figma "Welcome Screen" (1280x800) + "Sunmi K2"
   (1080x1920 portrait). Self-contained; loaded by retail/welcome.volt.
   ============================================================ */

.welcome-page {
    --w-radius: 24px;
    --w-field-radius: 16px;
    --w-card-bg: #171f22;
    --w-card-border: #222a2d;
    --w-field-bg: #e5eaeb;
    --w-ink: #06160c;

    box-sizing: border-box;
    min-height: 100vh;
    width: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 22px;
    padding: 40px 32px;
    background-color: #0a1628;
    background-image: url("/sites/BetifyLsRetail/img/welcome/welcome-bg.jpg");
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    font-family:
        "Manrope",
        system-ui,
        -apple-system,
        sans-serif;
}

.welcome-page *,
.welcome-page *::before,
.welcome-page *::after {
    box-sizing: border-box;
}

/* ---- glassy panel ---------------------------------------- */
.welcome-panel {
    width: 100%;
    max-width: 1156px;
    padding: 48px;
    border-radius: var(--w-radius);
    background: rgba(0, 0, 0, 0.1);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}

/* ---- header (WELCOME + logo) ----------------------------- */
.welcome-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 32px;
}

.welcome-head__title {
    margin: 0;
    font-size: 56px;
    font-weight: 800;
    line-height: 1.18;
    color: #ffffff;
    letter-spacing: -0.5px;
}

.welcome-head__subtitle {
    margin: 4px 0 0;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.33;
    color: #f8f8f8;
}

.welcome-head__logo {
    flex: 0 0 auto;
    height: 56px;
    width: auto;
    object-fit: contain;
}

.welcome-flash:empty {
    display: none;
}

.welcome-flash {
    margin-bottom: 20px;
}

.welcome-flash .alert,
.welcome-flash div {
    padding: 12px 18px;
    border-radius: 12px;
    background: rgba(231, 76, 60, 0.16);
    border: 1px solid rgba(231, 76, 60, 0.5);
    color: #ffd9d4;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
}

/* ---- cards row ------------------------------------------- */
/* Fluid: 2 columns when there's room (desktop, landscape kiosk, Sunmi K2
   portrait ~1080px), auto-collapsing to 1 column on phones/narrow tablets —
   no per-device breakpoint needed for the count. */
.welcome-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 24px;
    width: 100%;
    max-width: 880px;
    margin-inline: auto;
}

.wcard {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 36px;
    border-radius: var(--w-radius);
    background: var(--w-card-bg);
    border: 1px solid var(--w-card-border);
}

.wcard__head {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 28px;
}

.wcard__badge {
    flex: 0 0 auto;
    width: 56px;
    height: 56px;
}

.wcard__title {
    margin: 0;
    font-size: 24px;
    font-weight: 800;
    line-height: 1.2;
    color: #ffffff;
}

.wcard__desc {
    margin: 4px 0 0;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.33;
    color: #f8f8f8;
}

/* ---- form ------------------------------------------------ */
.wcard__form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: auto;
}

.wfield {
    width: 100%;
    height: 68px;
    padding: 0 24px;
    border: 1px solid transparent;
    border-radius: var(--w-field-radius);
    background: var(--w-field-bg);
    color: #111111;
    font-family: inherit;
    font-size: 20px;
    font-weight: 700;
    outline: none;
    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}

.wfield::placeholder {
    color: #8a929b;
    font-weight: 600;
}

.wfield:focus {
    border-color: #2DD264;
    box-shadow: 0 0 0 3px rgba(45, 210, 100, 0.25);
}

/* ---- buttons --------------------------------------------- */
.wbtn {
    position: relative;
    width: 100%;
    min-height: 64px;
    border: 1px solid transparent;
    border-radius: 999px;
    cursor: pointer;
    font-family: inherit;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 0.03em;
    color: var(--w-ink);
    transition:
        filter 0.15s ease,
        transform 0.08s ease,
        box-shadow 0.15s ease,
        opacity 0.15s ease;
}

.wbtn:hover {
    filter: brightness(1.05);
}

.wbtn:active {
    transform: translateY(1px);
}

.wbtn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.wbtn--brand {
    background: linear-gradient(135deg, #53da80 0%, #2DD264 58%, #24a850 100%);
    border-color: #2DD264;
    box-shadow: 0 10px 26px rgba(45, 210, 100, 0.28);
}

/* Secondary "Try it On" action: outlined, no fill — clearly subordinate to the
   brand voucher button while still being an obvious tap target on the kiosk. */
.wbtn--ghost {
    background: transparent;
    border-color: #2DD264;
    color: #2DD264;
    box-shadow: none;
}

.wbtn--ghost .wbtn__spinner {
    border-color: rgba(45, 210, 100, 0.35);
    border-top-color: #2DD264;
}

.wbtn__spinner {
    position: absolute;
    right: 22px;
    top: 50%;
    width: 20px;
    height: 20px;
    margin-top: -10px;
    border: 3px solid rgba(1, 23, 14, 0.35);
    border-top-color: var(--w-ink);
    border-radius: 50%;
    display: none;
    animation: wbtn-spin 0.7s linear infinite;
}

.wbtn.is-loading .wbtn__spinner {
    display: block;
}

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

/* ---- footer text ----------------------------------------- */
.welcome-help {
    margin: 32px 0 0;
    font-size: 14px;
    font-weight: 400;
    color: #f8f8f8;
    text-align: center;
}

.welcome-copy {
    margin: 0;
    font-size: 14px;
    font-weight: 400;
    color: #ffffff;
    text-align: center;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

/* ============================================================
   Portrait / Sunmi K2 (1080x1920): logo on top, centered head,
   portrait stadium background.
   ============================================================ */
@media (orientation: portrait) {
    .welcome-page {
        justify-content: flex-start;
        gap: 28px;
        padding: 56px 32px 32px;
        background-image: url("/sites/BetifyLsRetail/img/welcome/welcome-bg-portrait.jpg");
    }

    .welcome-panel {
        margin-top: 8vh;
        padding: 40px 32px;
    }

    .welcome-head {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 18px;
        margin-bottom: 28px;
    }

    .welcome-head__logo {
        order: -1;
        height: 64px;
    }

    .welcome-copy {
        margin-top: auto;
    }
}

/* ============================================================
   Narrow screens: stack the two cards.
   ============================================================ */
@media (max-width: 720px) {
    .welcome-page {
        padding: 24px 16px;
    }

    .welcome-panel {
        padding: 24px 18px;
    }

    .welcome-head {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 14px;
    }

    .welcome-head__logo {
        order: -1;
        height: 48px;
    }

    .welcome-head__title {
        font-size: 40px;
    }

    .welcome-head__subtitle {
        font-size: 15px;
    }

    .welcome-cards {
        grid-template-columns: 1fr;
        max-width: 440px;
        gap: 16px;
    }

    .wcard {
        padding: 28px 22px;
    }

    .wfield {
        height: 60px;
        font-size: 18px;
    }

    .wbtn {
        min-height: 58px;
        font-size: 20px;
    }
}
