/* ============================================================================
   GetPassed - Authenticated app pages redesign (v1)
   Phase 1: customer view page + the Messages dialog (opened by "SHOW ALL").
   Scoped to .customer-view and [data-dialog="messages"].
   ============================================================================ */

:root {
    --gp-ink: #0f172a;
    --gp-body: #475569;
    --gp-muted: #64748b;
    --gp-brand: #ff6b2c;
    --gp-brand-600: #e85a1c;
    --gp-muted-bg: #f1f5f9;
    --gp-border: #e2e8f0;
    --gp-radius: 14px;
    --gp-radius-pill: 999px;
    --gp-shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
    --gp-shadow-md: 0 12px 30px rgba(15, 23, 42, .10);
    --gp-shadow-lg: 0 24px 60px rgba(15, 23, 42, .20);
    --gp-font-head: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --gp-font-body: 'Open Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

/* ---------- customer view page ---------- */
section.customer-view {
    background-color: var(--gp-muted-bg) !important;
    font-family: var(--gp-font-body) !important;
    color: var(--gp-ink) !important;
    padding-top: 32px;
    padding-bottom: 64px;
}

    section.customer-view h1,
    section.customer-view h2,
    section.customer-view h3,
    section.customer-view .title,
    section.customer-view .name {
        font-family: var(--gp-font-head) !important;
        color: var(--gp-ink) !important;
    }

    /* cards */
    section.customer-view .info-block {
        background: #fff !important;
        border: 1px solid var(--gp-border) !important;
        border-radius: var(--gp-radius) !important;
        box-shadow: var(--gp-shadow-sm) !important;
    }

    section.customer-view .info-block .title {
        font-weight: 600 !important;
        font-size: 17px;
    }

    /* name */
    section.customer-view .name-block .name {
        font-weight: 700 !important;
        color: var(--gp-ink) !important;
    }

    /* tabs */
    section.customer-view .list-block .header .menu-item {
        font-family: var(--gp-font-head) !important;
        font-weight: 600;
        color: var(--gp-muted) !important;
    }

        section.customer-view .list-block .header .menu-item.menu-item-active {
            color: #c2410c !important;
        }

    /* reserve space for JS-populated blocks to reduce layout shift */
    section.customer-view .name-block {
        min-height: 150px;
    }

    section.customer-view .details-block {
        min-height: 250px;
    }

    section.customer-view .sms-block {
        min-height: 420px;
    }

    /* table */
    section.customer-view table.table th {
        color: var(--gp-muted) !important;
        font-size: 12px;
        letter-spacing: .05em;
        text-transform: uppercase;
    }

    section.customer-view table.table td {
        color: var(--gp-ink);
        vertical-align: middle;
    }

/* buttons */
section.customer-view .btn,
.modal[data-dialog="messages"] .btn {
    border-radius: var(--gp-radius-pill) !important;
    font-family: var(--gp-font-head) !important;
    font-weight: 700 !important;
    box-shadow: none !important;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}

section.customer-view .btn-three {
    background-color: var(--gp-brand) !important;
    color: #20140a !important;
    border: 0 !important;
}

section.customer-view .btn-six {
    background-color: var(--gp-ink) !important;
    color: #fff !important;
    border: 0 !important;
}

section.customer-view .btn-seven {
    background: #fff !important;
    color: var(--gp-ink) !important;
    border: 1px solid var(--gp-border) !important;
}

    section.customer-view .btn-seven:hover,
    section.customer-view .btn-seven:focus {
        border-color: var(--gp-ink) !important;
        color: var(--gp-ink) !important;
    }

/* "SHOW ALL" (btn-seven btn-sm) */
section.customer-view .btn.btn-seven.btn-sm {
    padding: 7px 18px;
    font-size: 12px;
    letter-spacing: .05em;
    text-transform: uppercase;
}

/* ============================ Messages dialog ============================ */
.modal[data-dialog="messages"] .modal-dialog {
    width: 100% !important;
    max-width: 680px;
    margin: 6vh auto !important;
}

.modal[data-dialog="messages"] .modal-content {
    border: 0 !important;
    border-radius: var(--gp-radius) !important;
    box-shadow: var(--gp-shadow-lg) !important;
    overflow: hidden;
}

.modal[data-dialog="messages"] .modal-header {
    border-bottom: 1px solid var(--gp-border) !important;
    padding: 18px 22px;
}

.modal[data-dialog="messages"] .modal-body {
    padding: 0 22px;
    max-height: 60vh;
    overflow-y: auto;
}

/* message rows (JS template: <div><span.sender><span.message><span.date>) */
.modal[data-dialog="messages"] .message-info > div {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4px 14px;
    padding: 16px 0;
    border-bottom: 1px solid var(--gp-border);
    font-family: var(--gp-font-body);
}

    .modal[data-dialog="messages"] .message-info > div:last-child {
        border-bottom: 0;
    }

    .modal[data-dialog="messages"] .message-info > div .sender {
        font-family: var(--gp-font-head);
        font-weight: 600;
        color: var(--gp-ink);
    }

    .modal[data-dialog="messages"] .message-info > div .message {
        grid-column: 1 / -1;
        color: var(--gp-body);
        line-height: 1.55;
    }

    .modal[data-dialog="messages"] .message-info > div .date {
        color: var(--gp-muted);
        font-size: 13px;
        white-space: nowrap;
    }

.modal[data-dialog="messages"] .modal-footer {
    border-top: 1px solid var(--gp-border) !important;
    padding: 16px 22px;
    display: block;
}

    .modal[data-dialog="messages"] .modal-footer .row {
        margin: 0 !important;
    }

    /* force the grid column full width so the Close button is centred + fully visible */
    .modal[data-dialog="messages"] .modal-footer [class*="col-"] {
        width: 100% !important;
        margin-left: 0 !important;
        float: none !important;
        padding: 0 !important;
        left: auto !important;
        right: auto !important;
    }

    .modal[data-dialog="messages"] .modal-footer .btn {
        background: var(--gp-ink) !important;
        color: #fff !important;
        border: 0 !important;
        height: 46px;
        width: 100% !important;
        display: block;
    }

/* ==================== Add appointment / Add reminder dialogs ==================== */
.modal.create-appointment-dialog .modal-dialog {
    width: 100% !important;
    max-width: 640px;
    margin: 6vh auto !important;
}

.modal.create-appointment-dialog .modal-content {
    border: 0 !important;
    border-radius: var(--gp-radius) !important;
    box-shadow: var(--gp-shadow-lg) !important;
    overflow: hidden;
}

.modal.create-appointment-dialog .modal-body {
    padding: 0 !important;
    font-family: var(--gp-font-body);
    color: var(--gp-ink);
}

    .modal.create-appointment-dialog .modal-body > .row.header {
        margin: 0 !important;
        padding: 20px 24px;
        border-bottom: 1px solid var(--gp-border);
    }

    .modal.create-appointment-dialog .row.header .left-block {
        font-family: var(--gp-font-head);
        font-weight: 700;
        font-size: 18px;
        color: var(--gp-ink);
    }

    .modal.create-appointment-dialog .row.header .right-block {
        float: right;
        color: var(--gp-muted);
        cursor: pointer;
        font-family: var(--gp-font-head);
        font-weight: 600;
        font-size: 12px;
        letter-spacing: .05em;
        text-transform: uppercase;
    }

        .modal.create-appointment-dialog .row.header .right-block:hover {
            color: var(--gp-ink);
        }

    .modal.create-appointment-dialog form {
        padding: 10px 24px 0;
    }

    .modal.create-appointment-dialog .label-text {
        font-family: var(--gp-font-head);
        font-size: 12px;
        font-weight: 600;
        letter-spacing: .05em;
        text-transform: uppercase;
        color: var(--gp-muted);
        margin-bottom: 6px;
    }

    .modal.create-appointment-dialog .form-control {
        border: 1px solid var(--gp-border) !important;
        border-radius: 10px !important;
        box-shadow: none !important;
        height: 46px;
        color: var(--gp-ink);
        background: #fff;
    }

    .modal.create-appointment-dialog textarea.form-control {
        height: auto;
        min-height: 90px;
        padding-top: 12px;
    }

    .modal.create-appointment-dialog .form-control:focus {
        border-color: var(--gp-brand) !important;
        box-shadow: 0 0 0 3px rgba(255, 107, 44, .22) !important;
    }

    .modal.create-appointment-dialog .selectors {
        margin: 18px 0 6px;
    }

    .modal.create-appointment-dialog .selector {
        text-align: center;
        padding: 10px 12px;
        border: 1px solid var(--gp-border);
        border-radius: var(--gp-radius-pill);
        color: var(--gp-ink);
        font-family: var(--gp-font-head);
        font-weight: 600;
        cursor: pointer;
    }

        .modal.create-appointment-dialog .selector.active-type {
            background: var(--gp-brand);
            border-color: var(--gp-brand);
            color: #20140a;
        }

    .modal.create-appointment-dialog .buttons {
        display: flex;
        justify-content: flex-end;
        gap: 12px;
        padding: 18px 24px 22px;
        margin-top: 8px;
        border-top: 1px solid var(--gp-border);
    }

        .modal.create-appointment-dialog .buttons > div {
            flex: 1 1 auto;
        }

        .modal.create-appointment-dialog .buttons .btn {
            border-radius: var(--gp-radius-pill) !important;
            font-family: var(--gp-font-head) !important;
            font-weight: 700 !important;
            height: 46px;
            min-width: 130px;
            box-shadow: none !important;
        }

        .modal.create-appointment-dialog .buttons .btn-seven {
            background: #fff !important;
            color: var(--gp-ink) !important;
            border: 1px solid var(--gp-border) !important;
        }

        .modal.create-appointment-dialog .buttons .btn-three {
            background: var(--gp-brand) !important;
            color: #20140a !important;
            border: 0 !important;
        }

@media (max-width: 767px) {
    .modal.create-appointment-dialog .buttons {
        padding: 16px;
    }

        .modal.create-appointment-dialog .buttons .btn {
            min-width: 0;
            width: 100%;
        }
}

/* focus visibility */
section.customer-view a:focus-visible,
section.customer-view button:focus-visible,
.modal[data-dialog="messages"] button:focus-visible {
    outline: 2px solid var(--gp-brand);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    section.customer-view *,
    .modal[data-dialog="messages"] * {
        transition: none !important;
    }
}

/* ---------- scheduler / calendar page ---------- */
section.scheduler {
    font-family: var(--gp-font-body) !important;
    color: var(--gp-ink) !important;
}

section.scheduler h1,
section.scheduler h2,
section.scheduler h3,
section.scheduler .title,
section.scheduler .name {
    font-family: var(--gp-font-head) !important;
    color: var(--gp-ink) !important;
}

/* calendar grid */
section.scheduler .month-date {
    background: #fff !important;
    border: 1px solid var(--gp-border) !important;
    border-radius: var(--gp-radius) !important;
    text-align: center !important;
}

section.scheduler .week-day-name {
    font-family: var(--gp-font-head) !important;
    font-weight: 600 !important;
    color: var(--gp-muted) !important;
    text-transform: uppercase !important;
    font-size: 11px !important;
    letter-spacing: .05em !important;
}

section.scheduler .not-month {
    background: var(--gp-muted-bg) !important;
}

section.scheduler .current {
    background: var(--gp-brand) !important;
    color: #fff !important;
}

section.scheduler .selected {
    background: var(--gp-brand-600) !important;
    color: #fff !important;
}

section.scheduler .value {
    font-weight: 600 !important;
    color: var(--gp-ink) !important;
    font-size: 14px !important;
}

/* status circles: pending / arrived / no-show */
section.scheduler .status-circle.pending {
    background: var(--gp-brand) !important;
    border-color: var(--gp-brand) !important;
}

section.scheduler .status-circle.arrived {
    background: #10b981 !important;
    border-color: #10b981 !important;
}

section.scheduler .status-circle.no-show {
    background: #ef4444 !important;
    border-color: #ef4444 !important;
}

/* appointment blocks / unavailable */
section.scheduler .block {
    background: var(--gp-muted-bg) !important;
    border-radius: var(--gp-radius) !important;
}

section.scheduler .block .appointment-title {
    font-family: var(--gp-font-head) !important;
    font-weight: 600 !important;
    color: var(--gp-muted) !important;
    font-size: 12px !important;
}

/* appointment bubbles */
section.scheduler .appointment {
    background: #fff !important;
    border-radius: var(--gp-radius) !important;
    box-shadow: var(--gp-shadow-sm) !important;
}

section.scheduler .appointment .circle {
    width: 10px !important;
    height: 10px !important;
    border-radius: 50% !important;
    flex-shrink: 0 !important;
}

section.scheduler .appointment .name {
    font-family: var(--gp-font-body) !important;
    color: var(--gp-ink) !important;
    font-size: 12px !important;
}

/* navigation buttons */
section.scheduler .btn {
    border-radius: var(--gp-radius-pill) !important;
    font-family: var(--gp-font-head) !important;
    font-weight: 700 !important;
    box-shadow: none !important;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}

section.scheduler .btn-three {
    background-color: var(--gp-brand) !important;
    color: #20140a !important;
    border: 0 !important;
}

section.scheduler .btn-six {
    background-color: var(--gp-ink) !important;
    color: #fff !important;
    border: 0 !important;
}

section.scheduler .btn-seven {
    background: #fff !important;
    color: var(--gp-ink) !important;
    border: 1px solid var(--gp-border) !important;
}

    section.scheduler .btn-seven:hover,
    section.scheduler .btn-seven:focus {
        border-color: var(--gp-ink) !important;
        color: var(--gp-ink) !important;
    }

/* "No Appointments" / "Scheduled..." text */
section.scheduler .no-appointments,
section.scheduler .scheduled-appointment {
    color: var(--gp-muted) !important;
    font-size: 14px !important;
}

/* focus visibility */
section.scheduler a:focus-visible,
section.scheduler button:focus-visible {
    outline: 2px solid var(--gp-brand);
    outline-offset: 2px;
}

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
    section.scheduler * {
        transition: none !important;
    }
}
