/*!
 * ChargeX reservations — Reserve button, booking pop-up, receipt and terms pages
 *
 * Loaded after live-status.css and reuses its tokens (--cx-*). Everything is
 * namespaced cx-rsv- / cx-receipt / cx-terms so nothing collides with the
 * template. The template sets p to 20px and capitalises h2; both are reset
 * here inside our own blocks only.
 */

/* ------------------------------------------------------- entry button --- */

.cx-rsv-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 18px 18px;
    padding: 7px 16px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    color: #fff;
    background: var(--cx-accent, #1b96e4);
    border: 1px solid var(--cx-accent, #1b96e4);
    border-radius: 999px;
    cursor: pointer;
    vertical-align: middle;
    transition: background-color .2s ease, box-shadow .2s ease;
}

.cx-rsv-btn:hover { background: #1583c9; border-color: #1583c9; }

.cx-rsv-btn:focus-visible,
.cx-rsv-modal .btn:focus-visible,
.cx-rsv-slot:focus-visible,
.cx-rsv-day:focus-visible {
    outline: 3px solid rgba(27, 150, 228, .45);
    outline-offset: 2px;
}

/* No coordinates: the button follows a block paragraph, so start the line. */
.cx-nocoords + .cx-rsv-btn { margin-left: 0; }

.cx-rsv-resume {
    position: relative;
    margin: 0 0 18px;
    padding: 14px 44px 14px 16px;
    font-size: 14.5px;
    line-height: 1.55;
    color: #134e75;
    background: #eaf5fd;
    border: 1px solid #bfe0f6;
    border-radius: 8px;
}

.cx-rsv-resume-close {
    position: absolute;
    top: 6px;
    right: 8px;
    width: 32px;
    height: 32px;
    font-size: 22px;
    line-height: 1;
    color: inherit;
    background: none;
    border: 0;
    cursor: pointer;
}

/* -------------------------------------------------------------- modal --- */

/* The template's back-to-top button sits above Bootstrap's backdrop. */
body.modal-open #button { visibility: hidden; }

.cx-rsv-modal .modal-dialog { max-width: 560px; }

.cx-rsv-modal .modal-content {
    border: 0;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(20, 20, 48, .25);
}

.cx-rsv-modal .modal-header {
    align-items: center;
    padding: 18px 22px 10px;
    border-bottom: 0;
}

.cx-rsv-title {
    margin: 0;
    font-size: 20px;
    line-height: 1.3;
    text-transform: none;
    color: var(--cx-heading, #292929);
}

.cx-rsv-modal .close { font-size: 28px; opacity: .6; }
.cx-rsv-modal .close:hover { opacity: 1; }

.cx-rsv-steps {
    display: flex;
    gap: 4px;
    margin: 0;
    padding: 0 22px 14px;
    list-style: none;
    border-bottom: 1px solid var(--cx-rule, #e4e4e4);
}

.cx-rsv-step {
    flex: 1 1 0;
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    font-size: 12.5px;
    color: var(--cx-unknown, #8a9499);
}

.cx-rsv-step-no {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    font-size: 12px;
    font-weight: 700;
    border: 1px solid currentColor;
    border-radius: 50%;
}

.cx-rsv-step-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.cx-rsv-step.cx-done { color: var(--cx-available, #12a150); }
.cx-rsv-step.cx-current { color: var(--cx-accent, #1b96e4); font-weight: 600; }
.cx-rsv-step.cx-current .cx-rsv-step-no { color: #fff; background: var(--cx-accent, #1b96e4); border-color: var(--cx-accent, #1b96e4); }

.cx-rsv-modal .modal-body { padding: 18px 22px 22px; }

.cx-rsv-captcha:not(:empty) { padding: 0 22px 18px; }

.cx-rsv-heading {
    margin: 0 0 10px;
    font-size: 18px;
    line-height: 1.35;
}

.cx-rsv-heading:focus { outline: none; }

.cx-rsv-text,
.cx-rsv-modal p {
    margin: 0 0 14px;
    font-size: 15px;
    line-height: 1.6;
    color: var(--cx-text, #666);
}

.cx-rsv-modal .cx-rsv-note { font-size: 14px; color: #4d5a60; }

.cx-rsv-alert {
    margin: 0 0 14px;
    padding: 10px 14px;
    font-size: 14.5px;
    line-height: 1.5;
    border-radius: 8px;
}

.cx-rsv-alert-error { color: #8a1c1c; background: #fdecec; border: 1px solid #f5c2c2; }
.cx-rsv-alert-info  { color: #134e75; background: #eaf5fd; border: 1px solid #bfe0f6; }

.cx-rsv-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 18px;
}

.cx-rsv-modal .btn,
.cx-receipt .btn {
    padding: 10px 20px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
}

.btn.cx-rsv-primary { color: #fff; background: var(--cx-accent, #1b96e4); border: 1px solid var(--cx-accent, #1b96e4); }
.btn.cx-rsv-primary:hover { color: #fff; background: #1583c9; border-color: #1583c9; }
.btn.cx-rsv-primary:disabled { opacity: .5; cursor: not-allowed; }
.btn.cx-rsv-secondary { color: var(--cx-heading, #292929); background: #fff; border: 1px solid #cfd8dd; }
.btn.cx-rsv-secondary:hover { background: var(--cx-wash, #f8f8f8); }

.cx-rsv-modal .btn.cx-rsv-link {
    padding: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--cx-accent, #1b96e4);
    background: none;
    border: 0;
}

.cx-rsv-modal .btn.cx-rsv-link:disabled { color: var(--cx-unknown, #8a9499); opacity: 1; }

.cx-rsv-loading {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 28px 0;
    font-size: 15px;
    color: var(--cx-text, #666);
}

.cx-rsv-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #cfe6f7;
    border-top-color: var(--cx-accent, #1b96e4);
    border-radius: 50%;
    animation: cx-rsv-spin .8s linear infinite;
}

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

@media (prefers-reduced-motion: reduce) {
    .cx-rsv-spinner { animation-duration: 2.4s; }
}

/* ------------------------------------------------------ step 1: offers -- */

.cx-rsv-offers { margin: 0; padding: 0; border: 0; min-width: 0; }

.cx-rsv-offer {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 0 10px;
    padding: 14px 16px;
    border: 1px solid var(--cx-rule, #e4e4e4);
    border-radius: 10px;
    cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease;
}

.cx-rsv-offer:hover { border-color: #9fcff0; }
.cx-rsv-offer input { flex: 0 0 auto; width: 18px; height: 18px; accent-color: var(--cx-accent, #1b96e4); }
.cx-rsv-offer:has(input:checked) { border-color: var(--cx-accent, #1b96e4); background: #f2f9fe; }
.cx-rsv-offer:has(input:focus-visible) { outline: 3px solid rgba(27, 150, 228, .45); outline-offset: 2px; }
.cx-rsv-offer.cx-disabled { cursor: not-allowed; opacity: .55; }

.cx-rsv-offer-text { display: flex; flex-direction: column; }
.cx-rsv-offer-label { font-size: 16px; color: var(--cx-heading, #292929); }
.cx-rsv-offer-meta { font-size: 13.5px; color: var(--cx-text, #666); }

/* ------------------------------------------------------- step 2: time --- */

.cx-rsv-days {
    display: flex;
    gap: 8px;
    margin: 0 -22px 12px;
    padding: 2px 22px 6px;
    overflow-x: auto;
    scrollbar-width: thin;
}

.cx-rsv-day,
.cx-rsv-slot {
    font-size: 14px;
    font-weight: 600;
    color: var(--cx-heading, #292929);
    background: #fff;
    border: 1px solid #cfd8dd;
    border-radius: 8px;
    cursor: pointer;
}

.cx-rsv-day { flex: 0 0 auto; padding: 8px 14px; line-height: 1.2; white-space: nowrap; }
.cx-rsv-day.cx-full { color: var(--cx-unknown, #8a9499); }

.cx-rsv-day[aria-pressed="true"],
.cx-rsv-slot[aria-pressed="true"] {
    color: #fff;
    background: var(--cx-accent, #1b96e4);
    border-color: var(--cx-accent, #1b96e4);
}

.cx-rsv-slots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
    gap: 8px;
    max-height: 264px;
    margin-bottom: 12px;
    overflow-y: auto;
}

.cx-rsv-slot { padding: 9px 4px; font-size: 13.5px; line-height: 1.2; white-space: nowrap; }
.cx-rsv-slot:hover:not(:disabled) { border-color: var(--cx-accent, #1b96e4); }

.cx-rsv-slot:disabled {
    color: #b3bcc0;
    background: var(--cx-wash, #f8f8f8);
    border-color: #eceff1;
    text-decoration: line-through;
    cursor: not-allowed;
}

.cx-rsv-empty { grid-column: 1 / -1; }

/* ---------------------------------------------- steps 3–4: phone, details */

.cx-rsv-form label,
.cx-rsv-legend {
    font-size: 14px;
    font-weight: 600;
    color: var(--cx-heading, #292929);
}

.cx-rsv-form .form-control,
.cx-rsv-form .input-group-text { font-size: 16px; height: auto; padding: 10px 12px; }

.cx-rsv-form .form-text { font-size: 13px; line-height: 1.5; }

.cx-rsv-otp { max-width: 200px; letter-spacing: .35em; font-variant-numeric: tabular-nums; }

.cx-rsv-otp-links { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: -4px; }

.cx-rsv-vehicles { margin: 0 0 6px; padding: 0; border: 0; min-width: 0; }
.cx-rsv-vehicles .custom-control { margin-bottom: 8px; }
.cx-rsv-vehicles .custom-control-label { font-size: 15px; font-weight: 500; }
.cx-rsv-new-vehicle { margin-top: 10px; }

.cx-rsv-field-error { font-size: 13px; color: #c0392b; }
.cx-rsv-field-error:empty { display: none; }

/* --------------------------------------------- step 5–6: summary, pay --- */

.cx-rsv-summary,
.cx-receipt-list {
    display: grid;
    grid-template-columns: minmax(96px, max-content) 1fr;
    gap: 8px 18px;
    margin: 0 0 16px;
    padding: 14px 16px;
    font-size: 14.5px;
    line-height: 1.5;
    background: var(--cx-wash, #f8f8f8);
    border-radius: 10px;
}

.cx-rsv-summary dt,
.cx-receipt-list dt { font-weight: 600; color: var(--cx-heading, #292929); }

.cx-rsv-summary dd,
.cx-receipt-list dd { margin: 0; color: var(--cx-text, #666); overflow-wrap: anywhere; }

.cx-rsv-terms { margin: 4px 0 6px; }

.cx-rsv-modal .custom-control-input:checked ~ .custom-control-label::before {
    background-color: var(--cx-accent, #1b96e4);
    border-color: var(--cx-accent, #1b96e4);
}
.cx-rsv-terms .custom-control-label { font-size: 14px; line-height: 1.55; color: var(--cx-text, #666); }

.cx-rsv-modal .cx-rsv-countdown {
    margin: 12px 0 0;
    font-size: 14px;
    font-weight: 600;
    color: #8a5a00;
    font-variant-numeric: tabular-nums;
}

@media (max-width: 575px) {
    .cx-rsv-modal .modal-dialog { margin: 0; max-width: none; min-height: 100%; }
    .cx-rsv-modal .modal-content { min-height: 100vh; border-radius: 0; }
    /* Don't stretch the body to fill the screen: the captcha (if on) sits
       after it and must stay right under the form, not at the bottom. */
    .cx-rsv-modal .modal-body { flex: 0 1 auto; min-height: 0; }
    .cx-rsv-captcha:not(:empty) { padding: 0 16px 18px; }
    .cx-rsv-modal .modal-header,
    .cx-rsv-modal .modal-body { padding-left: 16px; padding-right: 16px; }
    .cx-rsv-steps { padding: 0 16px 12px; }
    .cx-rsv-step-label { display: none; }
    .cx-rsv-step.cx-current { flex: 0 0 auto; padding-right: 8px; }
    .cx-rsv-step.cx-current .cx-rsv-step-label { display: inline; overflow: visible; }
    .cx-rsv-days { margin: 0 -16px 12px; padding: 2px 16px 6px; }
    .cx-rsv-summary { grid-template-columns: 1fr; gap: 2px; }
    .cx-rsv-summary dd { margin-bottom: 8px; }
    .cx-rsv-actions .btn { flex: 1 1 auto; }
    .cx-rsv-btn { margin-left: 0; }
    .cx-directions + .cx-rsv-btn { margin-left: 14px; }
}

/* ------------------------------------------------------- receipt page --- */

.cx-receipt {
    max-width: 680px;
    margin: 0 auto;
    padding: 28px 30px;
    background: #fff;
    border: 1px solid var(--cx-rule, #e4e4e4);
    border-radius: 12px;
}

/* Printed copies only (the site header is hidden in print). */
.cx-receipt .cx-receipt-brand {
    display: none;
    margin: 0 0 14px;
    font-family: "Lexend Deca", sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--cx-accent, #1b96e4);
}

.cx-receipt-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.cx-receipt-title {
    margin: 0 0 4px;
    font-size: 22px;
    line-height: 1.3;
    text-transform: none;
}

.cx-receipt p,
.cx-terms p,
.cx-terms li {
    font-size: 15.5px;
    line-height: 1.7;
    color: var(--cx-text, #666);
}

.cx-receipt .cx-receipt-meta { margin: 0; font-size: 14px; }

.cx-receipt-status {
    display: inline-block;
    padding: 3px 12px;
    font-size: 13px;
    font-weight: 700;
    border-radius: 999px;
}

.cx-receipt-status.cx-ok      { color: #0b6c36; background: rgba(18, 161, 80, .12); }
.cx-receipt-status.cx-off     { color: #8a1c1c; background: #fdecec; }
.cx-receipt-status.cx-neutral { color: #5a6569; background: rgba(138, 148, 153, .16); }

.cx-receipt-cancelled {
    margin: 0 0 16px;
    padding: 10px 14px;
    font-weight: 600;
    color: #8a1c1c;
    background: #fdecec;
    border: 1px solid #f5c2c2;
    border-radius: 8px;
}

.cx-receipt-section {
    margin: 18px 0 8px;
    font-size: 13px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--cx-unknown, #8a9499);
}

.cx-receipt-list { grid-template-columns: minmax(120px, max-content) 1fr; }

.cx-receipt .cx-receipt-foot { margin-top: 20px; font-size: 13.5px; }

.cx-receipt-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }

/* The template footer styles these two address links inline; the receipt and
   terms pages use this class instead so they stay free of inline styles. */
.cx-plain-link,
.cx-plain-link:hover { color: inherit; text-decoration: none; }

/* --------------------------------------------------------- terms page --- */

.cx-terms { max-width: 820px; margin: 0 auto; }

.cx-terms h2 {
    margin: 32px 0 10px;
    font-size: 22px;
    line-height: 1.35;
    text-transform: none;
}

.cx-terms ul { padding-left: 20px; }
.cx-terms li { margin-bottom: 6px; }
.cx-terms .cx-terms-updated { font-size: 14px; color: var(--cx-unknown, #8a9499); }

.cx-terms-draft {
    margin: 0 0 20px;
    padding: 10px 14px;
    font-weight: 600;
    color: #8a5a00;
    background: #fff6e0;
    border: 1px solid #f3d58b;
    border-radius: 8px;
}

/* -------------------------------------------------------------- print --- */

@media print {
    .cx-print-hide,
    .sub_banner,
    .footer-con,
    #button { display: none !important; }

    .cx-wrap { padding: 0 !important; }

    .cx-receipt {
        max-width: none;
        padding: 0;
        border: 0;
    }

    .cx-receipt-list { background: none; padding: 0; }

    .cx-receipt .cx-receipt-brand { display: block; }

    .cx-receipt a { color: inherit; text-decoration: none; }
}
