﻿/* Base page setup */
body {
    background: #F5F7FA; /* on-brand neutral */
    -webkit-tap-highlight-color: transparent;
}


/* Wrapper and card layout */
.checkin-wrapper {
    min-height: 100dvh; /* safe on mobile address bars */
    display: grid;
    place-items: center;
    padding: 24px;
}

.checkin-card {
    width: 100%;
    max-width: 520px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0,0,0,.06);
    padding: 24px;
}

/* Branding */
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

    .brand img,
    .brand-logo {
        height: 40px;
        width: auto;
    }

    .brand .brand-text {
        font-weight: 700;
        letter-spacing: .2px;
    }

/* Titles & subtitles */
.page-title {
    margin: 4px 0 16px 0;
    font-weight: 700;
}

.page-sub {
    color: #6c757d;
    margin-bottom: 20px;
}

/* Buttons */
.btn-block {
    width: 100%;
    padding-block: 14px; /* bigger tap targets */
    font-weight: 700;
    border-radius: 10px;
}

.btn-primary {
    background-color: #F16523;
    border-color: #F16523;
}

    .btn-primary:hover,
    .btn-primary:focus {
        background-color: #d9561e;
        border-color: #cf501c;
    }


.btn-secondary {
    background: #6c757d;
    border-color: #6c757d;
}

/* Info badge */
.info-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f1f3f5;
    color: #212529;
    border-radius: 999px;
    padding: 8px 12px;
    font-size: .95rem;
    margin: 6px 0;
}

    .info-pill strong {
        font-weight: 800;
        letter-spacing: .3px;
    }

/* Field grid */
.field-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

@media (min-width: 576px) {
    .field-grid--2 {
        grid-template-columns: 1fr 1fr;
    }
}

/* Field styling */
.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

    .field label {
        font-weight: 600;
    }

.nudge-top {
    margin-top: 6px;
}

/* Choice list for select page */
.choice-list {
    display: grid;
    gap: 12px;
    margin-top: 12px;
}

.radio-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    cursor: pointer;
    user-select: none;
    background: #fff;
    transition: border-color 0.15s ease;
}

    .radio-row:hover {
        border-color: #0A4D82; /* Safety Blue */
    }


    .radio-row input[type="radio"] {
        transform: scale(1.2);
    }

.other-wrap {
    display: grid;
    gap: 8px;
    margin-top: 8px;
}

/* Validation / error text */
.text-danger {
    color: #dc3545;
    font-size: 0.9rem;
    margin-top: 4px;
    transition: opacity .15s ease;
}

/* Yes/No chips */
.yn-group {
    display: flex;
    gap: 14px;
    margin-top: 6px;
}

.yn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 999px;
    padding: 8px 12px;
    cursor: pointer;
}

/* Area checked time inputs row */
.time-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr; /* AM / separator / PM */
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.time-sep {
    opacity: .7;
}

/* Small hint text */
.hint {
    color: #6c757d;
    font-size: 0.9rem;
    margin-top: 6px;
}

/* small vertical stack utility used near the modal trigger */
.stack {
    display: grid;
}

    .stack.sm-gap {
        gap: 8px;
    }

/* acknowledgement badge */
.ack-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #FFF3EB; /* soft orange background */
    color: #9A3A06; /* dark orange text */
    border: 1px solid #FFD1B0; /* light orange border */
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 0.9rem;
    font-weight: 600;
}


/* optional: make modal body comfy to read */
.modal-body p {
    margin-bottom: 0.85rem;
}

/* Terms and conditions box */
.terms-box {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    max-height: 400px;
    overflow-y: auto;
}

    .terms-box-content {
        white-space: pre-wrap;
        font-size: 14px;
        line-height: 1.6;
    }

/* Terms checkbox container */
.terms-checkbox-container {
    margin-top: 20px;
    padding-left: 0;
}

    .terms-checkbox-label {
        display: flex;
        align-items: flex-start;
        cursor: pointer;
    }

    .terms-checkbox-input {
        margin-top: 4px;
        width: 20px;
        height: 20px;
        cursor: pointer;
    }

    .terms-checkbox-text {
        margin-left: 12px;
    }

    .terms-validation-error {
        display: block;
        margin-top: 8px;
    }

/* Alert boxes */
.alert-no-terms {
    margin: 20px 0;
}

    .alert-no-terms p {
        margin: 0;
    }

    .alert-no-terms p:last-child {
        margin: 8px 0 0 0;
        font-size: 14px;
    }

/* Button containers */
.button-container {
    margin-top: 24px;
}

.button-secondary-spacing {
    margin-top: 12px;
}

/* SelectPermit other row */
.other-radio-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    cursor: pointer;
    user-select: none;
    background: #fff;
    transition: border-color 0.15s ease;
}

.other-label {
    margin: 0;
}

.validation-error-block {
    display: block;
    margin-top: 8px;
}

.submit-button-container {
    margin-top: 18px;
}

/* --------------------------------------------------------- */
/* 📱 MOBILE OPTIMIZATION: flatten card & reclaim space      */
/* --------------------------------------------------------- */

@media (max-width: 575.98px) {
    .checkin-wrapper {
        padding: 12px;
    }

    .checkin-card {
        max-width: none;
        width: 100%;
        padding: 16px;
        border-radius: 0;
        box-shadow: none;
        background: transparent; /* let page bg show through */
    }

    .brand {
        margin-bottom: 6px;
        justify-content: center;
    }

        .brand img,
        .brand-logo {
            height: 32px;
        }

    .page-title {
        margin: 2px 0 12px 0;
    }

    .page-sub {
        margin-bottom: 14px;
    }

    .field-grid {
        gap: 10px;
    }

    .field {
        gap: 4px;
    }

    .btn-block {
        padding-block: 14px; /* still big for “builder fingers” */
    }

    .info-pill {
        padding: 6px 10px;
        font-size: .9rem;
    }

    .radio-row {
        padding: 10px;
    }
}

/* --------------------------------------------------------- */
/* 🖥️ Desktop/tablet: restore card look                      */
/* --------------------------------------------------------- */
@media (min-width: 576px) {
    .checkin-card {
        background: #fff;
        border-radius: 16px;
        box-shadow: 0 8px 30px rgba(0,0,0,.06);
        padding: 28px;
        max-width: 520px;
    }
}
