/* KindStock kiosk / station / offsite surface.
   Moved verbatim from styles.css (selectors frozen: these flows are e2e-pinned),
   then tokenized. Loaded on every shell so the offline till precache stays simple. */

/* ==========================================================================
   Kiosk Page (Standalone)
   ========================================================================== */
.kiosk-body {
    background: linear-gradient(135deg, var(--gs-primary) 0%, var(--gs-secondary) 100%);
    min-height: 100vh;
}

.kiosk-body h1,
.kiosk-body .lead {
    color: white;
}

.kiosk-card {
    border: none;
    border-radius: 1rem;
}

#sigCanvas {
    border: 2px solid var(--ks-rule);
    border-radius: 0.5rem;
    background: white;
    touch-action: none;
}

/* Gift Aid checkbox scaling for touch */
.gift-aid-switch {
    transform: scale(1.5);
}

/* ==========================================================================
   Station Page (Standalone)
   ========================================================================== */
.station-body {
    background: var(--ks-surface);
}

.donor-card {
    cursor: pointer;
    transition: all 0.2s;
}

.donor-card:hover {
    background: var(--ks-accent-tint);
}

.donor-card.selected {
    background: var(--ks-sage-mist);
    border-color: var(--ks-sage);
}

/* ==========================================================================
   Offsite Intake Page (Standalone)
   ========================================================================== */
.offsite-body {
    background: var(--ks-surface);
}

/* .btn-primary comes from the tokens.css bridge (accent + darkened hover). */

.offsite-header {
    background: var(--ks-chrome);
    color: white;
    padding: 1rem;
    text-align: center;
}

.offsite-main {
    max-width: 500px;
    margin: 0 auto;
    padding: 1rem;
}

.success-card {
    text-align: center;
    padding: 2rem;
    background: #d1fae5;
    border-radius: 1rem;
    margin-top: 1rem;
}

/* ==========================================================================
   Kiosk Interface Touch Optimization
   ========================================================================== */

/* Kiosk form controls - extra large for public use */
.kiosk-body .form-control,
.kiosk-body .form-select {
    min-height: 48px;
    font-size: 1rem;
}

.kiosk-body .form-control-lg,
.kiosk-body .form-select-lg {
    min-height: 56px;
    font-size: 1.1rem;
}

@media (min-width: 768px) {
    .kiosk-body .form-control,
    .kiosk-body .form-select {
        min-height: 52px;
        font-size: 1.05rem;
    }

    .kiosk-body .form-control-lg,
    .kiosk-body .form-select-lg {
        min-height: 60px;
        font-size: 1.15rem;
    }
}

/* Kiosk submit button - large prominent touch target */
.kiosk-body .btn-lg.w-100 {
    min-height: 64px;
    font-size: 1.25rem;
}

@media (min-width: 768px) {
    .kiosk-body .btn-lg.w-100 {
        min-height: 72px;
        font-size: 1.4rem;
    }
}

/* Gift Aid switch - already has scale(1.5), enhance touch area */
.kiosk-body .form-check.form-switch {
    min-height: 48px;
    padding-left: 3.5rem;
    display: flex;
    align-items: center;
}

.kiosk-body .form-check-input.gift-aid-switch {
    width: 3.5rem;
    height: 1.75rem;
    margin-left: -3.5rem;
    /* The switch is explicitly sized here; cancel the global scale(1.5)
       (line ~294) which would otherwise visually overflow onto the label. */
    transform: none;
}

@media (min-width: 768px) {
    .kiosk-body .form-check.form-switch {
        min-height: 56px;
        padding-left: 4rem;
    }

    .kiosk-body .form-check-input.gift-aid-switch {
        width: 4rem;
        height: 2rem;
        margin-left: -4rem;
    }
}

/* Kiosk signature canvas - touch optimized */
.kiosk-body #sigCanvas {
    min-height: 150px;
    touch-action: none;
    border: 2px solid var(--ks-rule);
    border-radius: 0.5rem;
    cursor: crosshair;
}

@media (min-width: 768px) {
    .kiosk-body #sigCanvas {
        min-height: 200px;
    }
}

/* Kiosk clear signature button */
.kiosk-body #clearSig {
    min-height: 40px;
    min-width: 80px;
}

@media (min-width: 768px) {
    .kiosk-body #clearSig {
        min-height: 44px;
        min-width: 100px;
    }
}

/* Kiosk card styling for better touch experience */
.kiosk-card {
    border-radius: 1rem;
}

.kiosk-card .card-body {
    padding: 1.5rem;
}

@media (min-width: 768px) {
    .kiosk-card .card-body {
        padding: 2rem;
    }
}

/* Kiosk success card button */
.kiosk-body #successCard .btn-lg {
    min-height: 56px;
    font-size: 1.1rem;
}

@media (min-width: 768px) {
    .kiosk-body #successCard .btn-lg {
        min-height: 64px;
        font-size: 1.25rem;
    }
}

/* Kiosk title selector (dropdown) */
.kiosk-body select[name="title"],
.kiosk-body select[name="communication"] {
    min-height: 48px;
}

@media (min-width: 768px) {
    .kiosk-body select[name="title"],
    .kiosk-body select[name="communication"] {
        min-height: 52px;
    }
}

