/* Customer-facing Scratch2Win — mobile-first (Admin area uses its own layout) */
:root {
    --s2w-surface: #ffffff;
    --s2w-accent: #ff4d6d;
    --s2w-accent-2: #7b2ff7;
    --s2w-radius: 1.25rem;
    --s2w-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
    --s2w-text: #1f2937;
    --s2w-muted: #6b7280;
    --s2w-safe-top: env(safe-area-inset-top, 0px);
    --s2w-safe-bottom: env(safe-area-inset-bottom, 0px);
    --s2w-safe-left: env(safe-area-inset-left, 0px);
    --s2w-safe-right: env(safe-area-inset-right, 0px);
    --s2w-page-pad-x: max(1rem, var(--s2w-safe-left), var(--s2w-safe-right));
    --s2w-navratri-frame: url("/Elegant%20Blue%20and%20Gold%20Navratri%20Frame.png");
    --s2w-navratri-bg-color: #f8f6f2;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* Standalone pages (landing, scratch, claim) */
.s2w-page {
    min-height: 100dvh;
    margin: 0;
    overflow-x: hidden;
    background-color: var(--s2w-navratri-bg-color);
    background-image: var(--s2w-navratri-frame);
    background-repeat: no-repeat;
    background-position: center top;
    background-size: 100% auto;
    padding:
        max(0.75rem, var(--s2w-safe-top))
        var(--s2w-page-pad-x)
        calc(1.25rem + var(--s2w-safe-bottom));
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: var(--s2w-text);
    -webkit-font-smoothing: antialiased;
}

.s2w-wrap {
    width: 100%;
    max-width: 26rem;
    margin-left: auto;
    margin-right: auto;
}

.s2w-logo img {
    max-width: min(42vw, 9.5rem);
    height: auto;
    display: block;
    margin: 0 auto 0.85rem;
}

.s2w-hero-title {
    font-size: clamp(1.25rem, 4.8vw, 1.6rem);
    font-weight: 800;
    text-align: center;
    margin: 0 0 0.35rem;
    letter-spacing: -0.02em;
    color: var(--s2w-text);
}

.s2w-hero-sub {
    text-align: center;
    color: var(--s2w-muted);
    font-size: 0.9375rem;
    margin: 0 0 1.15rem;
    line-height: 1.5;
    padding: 0 0.25rem;
}

.s2w-card {
    background: var(--s2w-surface);
    border-radius: var(--s2w-radius);
    box-shadow: var(--s2w-shadow);
    border: 1px solid rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.s2w-card-body {
    padding: 1.15rem 1rem 1.25rem;
}

.s2w-form .form-label {
    font-weight: 600;
    font-size: 0.8125rem;
    color: #374151;
    margin-bottom: 0.35rem;
}

.s2w-form .form-control,
.s2w-form .input-group-text {
    min-height: 3rem;
    font-size: 1rem; /* prevents iOS zoom on focus */
    border-radius: 0.75rem !important;
}

.s2w-form .input-group .form-control {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}

.s2w-form .input-group-text.currency-prefix {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    background: #f1f3f5;
    font-weight: 700;
    min-width: 2.75rem;
    justify-content: center;
}

.s2w-form .field-validation-error,
.s2w-form .validation-summary-errors {
    font-size: 0.8125rem;
}

.s2w-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3rem;
    padding: 0.65rem 1.25rem;
    border: none;
    border-radius: 999px;
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.2;
    background: linear-gradient(135deg, var(--s2w-accent), var(--s2w-accent-2));
    color: #fff !important;
    width: 100%;
    box-shadow: 0 8px 24px rgba(255, 77, 109, 0.32);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    cursor: pointer;
}

.s2w-btn-primary:disabled {
    opacity: 0.65;
}

.s2w-alert {
    border-radius: 0.85rem;
    font-size: 0.9rem;
    padding: 0.75rem 0.85rem;
}

/* Pages using main site _Layout */
body.s2w-customer-body {
    margin-bottom: 0;
    overflow-x: hidden;
    min-height: 100dvh;
    background-color: var(--s2w-navratri-bg-color);
    background-image: var(--s2w-navratri-frame);
    background-repeat: no-repeat;
    background-position: center top;
    background-size: 100% auto;
}

body.s2w-customer-body .s2w-site-header {
    background: rgba(255, 255, 255, 0.92) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
    margin-bottom: 0 !important;
    padding-top: var(--s2w-safe-top);
}

body.s2w-customer-body .s2w-site-header .navbar-brand {
    font-weight: 800;
    font-size: 1.05rem;
}

body.s2w-customer-body .s2w-site-header .nav-staff-link {
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.35rem 0.5rem;
}

body.s2w-customer-body .s2w-site-main {
    padding-bottom: calc(4.5rem + var(--s2w-safe-bottom));
}

body.s2w-customer-body .s2w-site-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10;
    background: rgba(255, 255, 255, 0.95);
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    padding: 0.65rem var(--s2w-page-pad-x) calc(0.65rem + var(--s2w-safe-bottom));
    font-size: 0.75rem;
    text-align: center;
    line-height: 1.35;
}

body.s2w-customer-body .s2w-site-footer .container {
    max-width: none;
    padding: 0;
}

/* Home */
.s2w-home-shell {
    min-height: calc(100dvh - 3.5rem);
    padding: 0.5rem 0 1rem;
}

.s2w-home-logo {
    display: block;
    width: min(40vw, 9rem);
    margin: 0 auto 0.65rem;
    height: auto;
}

.s2w-home-tag {
    text-align: center;
    color: var(--s2w-muted);
    font-size: 0.9rem;
    margin: 0 auto 1.25rem;
    max-width: 20rem;
    line-height: 1.45;
}

.s2w-home-live-stage {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 14rem;
    margin-bottom: 1.75rem;
    padding: 0 0.25rem;
}

.s2w-home-live {
    display: block;
    width: 100%;
    max-width: 20rem;
    text-decoration: none;
    color: #fff !important;
    border-radius: var(--s2w-radius);
    background: linear-gradient(145deg, #ff512f, #dd2476 42%, #7b2ff7);
    box-shadow: 0 14px 40px rgba(221, 36, 118, 0.32);
    padding: 1.65rem 1.25rem 1.5rem;
    text-align: center;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.s2w-home-live:active {
    transform: scale(0.985);
}

.s2w-home-live .live-badge {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: rgba(255, 255, 255, 0.28);
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    margin-bottom: 0.65rem;
}

.s2w-home-live .live-title {
    font-size: clamp(1.45rem, 6vw, 1.75rem);
    font-weight: 800;
    margin: 0 0 0.35rem;
    line-height: 1.15;
}

.s2w-home-live .live-sub {
    font-size: 0.9rem;
    opacity: 0.94;
    margin: 0 0 0.85rem;
    line-height: 1.4;
}

.s2w-home-live .live-cta {
    font-weight: 700;
    font-size: 1rem;
}

.s2w-inactive-section {
    max-width: 26rem;
    margin: 0 auto;
    padding: 0 0.15rem;
}

.s2w-inactive-label {
    text-align: center;
    color: #9ca3af;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    margin-bottom: 0.6rem;
}

.s2w-inactive-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    opacity: 0.55;
    filter: grayscale(0.9);
}

.s2w-inactive-chip {
    pointer-events: none;
    user-select: none;
    border-radius: 0.65rem;
    padding: 0.55rem 0.5rem;
    background: #e5e7eb;
    color: #6b7280;
    font-size: 0.78rem;
    border: 1px dashed #d1d5db;
    text-align: center;
    min-height: 3.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.s2w-inactive-chip .chip-title {
    font-weight: 700;
    line-height: 1.2;
}

.s2w-inactive-chip .chip-badge {
    font-size: 0.62rem;
    text-transform: uppercase;
    margin-top: 0.15rem;
}

/* Staff login (still customer-facing chrome) */
.s2w-login-shell {
    padding: 0.5rem 0 1rem;
}

.s2w-login-card {
    margin-top: 0.5rem;
}

.s2w-login-card .form-control {
    min-height: 3rem;
    font-size: 1rem;
}

/* Scratch card — works with Navratri2025_style.css + Navratri2025_script.js */
.s2w-scratch-page {
    text-align: center;
}

.s2w-scratch-root {
    text-align: center;
}

.s2w-scratch-logo {
    width: min(40vw, 8rem);
    height: auto;
    margin: 0 auto 0.85rem;
    display: block;
}

.s2w-scratch-heading {
    font-size: clamp(1.15rem, 4.5vw, 1.45rem);
    font-weight: 800;
    margin: 0 0 0.35rem;
    color: var(--s2w-text);
}

.s2w-scratch-subheading {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 1rem;
    color: var(--s2w-muted);
}

/* Legacy scratch layout: foil canvas on top of prize text */
.s2w-scratch-legacy.container {
    width: min(92vw, 300px) !important;
    max-width: 300px;
    margin: 0 auto 1.25rem !important;
    position: relative;
    min-height: 300px;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.14);
}

.s2w-scratch-legacy canvas.canvas {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 300px !important;
    max-width: 300px;
    z-index: 2;
    touch-action: none;
    cursor: pointer;
}

.s2w-scratch-legacy .form {
    position: relative;
    z-index: 1;
    min-height: 300px;
    padding: 1rem 0.75rem 1.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #fff9e6, #ffffff);
}

.s2w-scratch-legacy .form h2 {
    font-size: 1rem;
    margin: 0.35rem 0;
    line-height: 1.35;
}

.s2w-scratch-prize-text {
    font-size: 1.05rem !important;
    margin: 0.5rem 0 !important;
}

.s2w-scratch-time {
    font-size: 0.8125rem;
    color: var(--s2w-muted);
    margin: 0.35rem 0 0.75rem;
}

.s2w-scratch-claim-form {
    width: 100%;
    max-width: 16rem;
    margin: 0 auto;
}

.s2w-scratch-claim-btn {
    margin-top: 0.25rem;
}

/* Full Navratri 2026 scratch artwork (foil image includes titles) */
.s2w-scratch-legacy.s2w-scratch-artwork {
    width: min(94vw, 380px) !important;
    max-width: 380px;
    min-height: 0;
    aspect-ratio: 1;
    border-radius: 0.5rem;
}

.s2w-scratch-artwork canvas.canvas {
    height: 100% !important;
    max-width: none;
}

.s2w-scratch-artwork .form {
    min-height: 100%;
    padding: 1.25rem 0.85rem;
    background: rgba(255, 255, 255, 0.96);
}

.s2w-claim-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.s2w-claim-list li {
    display: grid;
    grid-template-columns: minmax(5rem, 38%) 1fr;
    gap: 0.5rem 0.75rem;
    align-items: start;
    padding: 0.7rem 0;
    border-bottom: 1px solid #eee;
    font-size: 0.9375rem;
}

.s2w-claim-list li span:first-child {
    color: var(--s2w-muted);
}

.s2w-claim-list li span:last-child {
    font-weight: 600;
    text-align: right;
    word-break: break-word;
}

@media (min-width: 768px) {
    .s2w-page {
        padding-top: 1.5rem;
    }

    .s2w-inactive-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 360px) {
    .s2w-inactive-grid {
        grid-template-columns: 1fr;
    }
}
