/* ────────────────────────────────────────────────────────────────
   Slotly Booking Form  –  assets/css/booking.css
   ──────────────────────────────────────────────────────────────── */

:root {
    --sl-accent:      #3dd6c8;
    --sl-accent-dark: #2ab5a8;
    --sl-text:        #1a1a2e;
    --sl-muted:       #6b7280;
    --sl-border:      #e5e7eb;
    --sl-bg:          #f9fafb;
    --sl-white:       #ffffff;
    --sl-error:       #ef4444;
    --sl-success:     #22c55e;
    --sl-radius:      8px;
    --sl-shadow:      0 1px 3px rgba(0,0,0,.08), 0 4px 12px rgba(0,0,0,.06);
}

.slotly-booking-form {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 15px;
    color: var(--sl-text);
    max-width: 680px;
    margin: 0 auto;
}

/* ── Progress bar ─────────────────────────────────────────────── */
.slotly-progress {
    display: flex;
    gap: 0;
    margin-bottom: 2rem;
    border-radius: var(--sl-radius);
    overflow: hidden;
    border: 1px solid var(--sl-border);
}
.slotly-progress .slotly-step {
    flex: 1;
    text-align: center;
    padding: .6rem .4rem;
    font-size: 13px;
    font-weight: 500;
    background: var(--sl-white);
    color: var(--sl-muted);
    border-right: 1px solid var(--sl-border);
    transition: background .2s, color .2s;
}
.slotly-progress .slotly-step:last-child { border-right: none; }
.slotly-progress .slotly-step.active {
    background: var(--sl-accent);
    color: #fff;
}
.slotly-progress .slotly-step.done {
    background: var(--sl-bg);
    color: var(--sl-accent-dark);
}

/* ── Step panel ───────────────────────────────────────────────── */
.slotly-step-panel h3 {
    font-size: 1.1rem;
    margin: 0 0 1rem;
    color: var(--sl-text);
}

/* ── Service cards ────────────────────────────────────────────── */
.slotly-service-list {
    display: flex;
    flex-direction: column;
    gap: .6rem;
}
.slotly-service-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--sl-white);
    border: 1px solid var(--sl-border);
    border-radius: var(--sl-radius);
    padding: .9rem 1rem;
    cursor: pointer;
    transition: box-shadow .15s, border-color .15s;
}
.slotly-service-card:hover { box-shadow: var(--sl-shadow); border-color: var(--sl-accent); }
.slotly-service-card.selected { border-color: var(--sl-accent); background: #f0fffe; }
.slotly-service-card strong { display: block; margin-bottom: .2rem; }
.slotly-service-meta { font-size: 13px; color: var(--sl-muted); }
.slotly-service-desc { font-size: 13px; color: var(--sl-muted); margin: .4rem 0 0; }
.slotly-service-select input { accent-color: var(--sl-accent); width: 18px; height: 18px; }

/* ── Calendar ─────────────────────────────────────────────────── */
.slotly-calendar-wrapper { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.slotly-calendar { flex: 0 0 auto; min-width: 240px; }
.slotly-slots    { flex: 1; min-width: 200px; }

.slotly-cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: .5rem;
    font-weight: 600;
}
.slotly-cal-prev,
.slotly-cal-next {
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    color: var(--sl-accent-dark);
    padding: 0 .4rem;
    line-height: 1;
}
.slotly-cal-table { border-collapse: collapse; width: 100%; }
.slotly-cal-table th { text-align: center; font-size: 12px; color: var(--sl-muted); padding: .3rem; }
.slotly-cal-table td { text-align: center; padding: .3rem; }
.slotly-cal-day { border-radius: 50%; width: 32px; height: 32px; line-height: 32px;
                  display: inline-block; cursor: pointer; font-size: 13px; }
.slotly-cal-day.available:hover { background: var(--sl-accent); color: #fff; }
.slotly-cal-day.available:focus,
.slotly-cal-day.available:focus-visible {
    outline: 3px solid var(--sl-accent-dark);
    outline-offset: 2px;
    background: var(--sl-accent);
    color: #fff;
}
.slotly-cal-day.selected { background: var(--sl-accent-dark); color: #fff; }
.slotly-cal-day.past        { color: #ccc; pointer-events: none; }
.slotly-cal-day.unavailable { color: #ddd; pointer-events: none; cursor: not-allowed; }
.slotly-cal-day.available   { font-weight: 600; }

/* ── Slot grid ────────────────────────────────────────────────── */
.slotly-slot-grid { display: flex; flex-wrap: wrap; gap: .5rem; }
.slotly-slot {
    background: var(--sl-white);
    border: 1px solid var(--sl-border);
    border-radius: 6px;
    padding: .4rem .8rem;
    font-size: 14px;
    cursor: pointer;
    transition: background .15s, border-color .15s;
}
.slotly-slot:hover { border-color: var(--sl-accent); background: #f0fffe; }
.slotly-slot:focus,
.slotly-slot:focus-visible {
    outline: 3px solid var(--sl-accent-dark);
    outline-offset: 2px;
    border-color: var(--sl-accent);
}
.slotly-slot.selected { background: var(--sl-accent); color: #fff; border-color: var(--sl-accent); }

/* ── Details form ─────────────────────────────────────────────── */
.slotly-details-form { display: flex; flex-direction: column; gap: .8rem; }
.slotly-details-form label {
    display: flex;
    flex-direction: column;
    gap: .3rem;
    font-size: 14px;
    font-weight: 500;
}
.slotly-details-form input,
.slotly-details-form textarea {
    width: 100%;
    padding: .55rem .8rem;
    border: 1px solid var(--sl-border);
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color .15s;
    box-sizing: border-box;
}
.slotly-details-form input:focus,
.slotly-details-form textarea:focus {
    outline: 3px solid var(--sl-accent);
    outline-offset: 2px;
    border-color: var(--sl-accent);
}
.slotly-error-field { border-color: var(--sl-error) !important; }
.required { color: var(--sl-error); }

/* ── Order summary ────────────────────────────────────────────── */
.slotly-order-summary {
    background: var(--sl-bg);
    border: 1px solid var(--sl-border);
    border-radius: var(--sl-radius);
    padding: 1rem;
    margin-bottom: 1.2rem;
}
.slotly-order-summary table { width: 100%; border-collapse: collapse; }
.slotly-order-summary th,
.slotly-order-summary td { padding: .3rem .5rem; font-size: 14px; text-align: left; }
.slotly-order-summary th { color: var(--sl-muted); font-weight: 500; width: 35%; }
.slotly-total-row th,
.slotly-total-row td { font-weight: 700; font-size: 1rem; border-top: 1px solid var(--sl-border); padding-top: .6rem; }

/* ── Payment method options ───────────────────────────────────── */
.slotly-payment-methods { display: flex; flex-direction: column; gap: .5rem; margin-bottom: 1.2rem; }
.slotly-payment-option {
    display: flex;
    align-items: center;
    gap: .7rem;
    background: var(--sl-white);
    border: 1px solid var(--sl-border);
    border-radius: var(--sl-radius);
    padding: .75rem 1rem;
    cursor: pointer;
    font-weight: 500;
    transition: border-color .15s;
}
.slotly-payment-option:has(input:checked) { border-color: var(--sl-accent); background: #f0fffe; }
.slotly-payment-option input { accent-color: var(--sl-accent); width: 16px; height: 16px; }

/* ── Navigation ───────────────────────────────────────────────── */
.slotly-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 1.4rem; }

/* ── Buttons ──────────────────────────────────────────────────── */
.slotly-btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .6rem 1.4rem;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: background .15s, opacity .15s;
}
.slotly-btn-next,
.slotly-btn-pay {
    background: var(--sl-accent);
    color: #fff;
    margin-left: auto;
}
.slotly-btn-next:hover,
.slotly-btn-pay:hover { background: var(--sl-accent-dark); }
.slotly-btn-next:focus-visible,
.slotly-btn-pay:focus-visible {
    outline: 3px solid var(--sl-accent-dark);
    outline-offset: 2px;
}
.slotly-btn-next:disabled,
.slotly-btn-pay:disabled { opacity: .45; cursor: not-allowed; }
.slotly-btn-back { background: none; border: 1px solid var(--sl-border); color: var(--sl-muted); }
.slotly-btn-back:hover { border-color: var(--sl-accent); color: var(--sl-accent-dark); }
.slotly-btn-back:focus-visible {
    outline: 3px solid var(--sl-accent-dark);
    outline-offset: 2px;
}

/* Service card focus ring (the <label> is the interactive element) */
.slotly-service-card:focus-within {
    box-shadow: var(--sl-shadow);
    border-color: var(--sl-accent);
    outline: 3px solid var(--sl-accent-dark);
    outline-offset: 2px;
}

/* Required-field note */
.slotly-required-note {
    font-size: 13px;
    color: var(--sl-muted);
    margin: 0 0 .8rem;
}

/* Payment methods fieldset */
.slotly-payment-methods {
    border: none;
    padding: 0;
    margin: 0 0 1.2rem;
}
.slotly-payment-methods legend {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: .5rem;
    padding: 0;
}

/* Inline validation error (details panel) */
.slotly-inline-error {
    color: var(--sl-error);
    font-size: 13px;
    margin: .5rem 0 0;
}

/* ── Error bar ────────────────────────────────────────────────── */
.slotly-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: var(--sl-error);
    border-radius: 6px;
    padding: .7rem 1rem;
    font-size: 14px;
    margin-top: 1rem;
}

/* ── Loading / spinner ────────────────────────────────────────── */
.slotly-loading { min-height: 80px; display: flex; align-items: center; justify-content: center; }
.slotly-spinner {
    width: 30px; height: 30px;
    border: 3px solid var(--sl-border);
    border-top-color: var(--sl-accent);
    border-radius: 50%;
    animation: sl-spin .7s linear infinite;
}
@keyframes sl-spin { to { transform: rotate(360deg); } }

/* ── Confirmation page ────────────────────────────────────────── */
.slotly-confirmation { text-align: center; padding: 2rem 1rem; }
.slotly-confirmation-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px; height: 64px;
    border-radius: 50%;
    background: var(--sl-success);
    color: #fff;
    font-size: 2rem;
    margin-bottom: 1rem;
}
.slotly-confirmation h2 { margin: 0 0 1.5rem; font-size: 1.5rem; }
.slotly-confirmation-table {
    margin: 0 auto 1.5rem;
    border-collapse: collapse;
    width: 100%;
    max-width: 460px;
    text-align: left;
}
.slotly-confirmation-table th,
.slotly-confirmation-table td {
    padding: .5rem .8rem;
    border-bottom: 1px solid var(--sl-border);
    font-size: 14px;
}
.slotly-confirmation-table th { color: var(--sl-muted); font-weight: 500; width: 35%; }
.slotly-confirmation-note { color: var(--sl-muted); font-size: 13px; }

/* ── Consent checkboxes (newsletter + privacy) ────────────────── */
.slotly-checkbox-label {
    display: grid;
    grid-template-columns: 18px 1fr;
    align-items: start;
    gap: .5rem;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    padding: .4rem 0;
    direction: ltr;  /* never inherit RTL from theme — checkbox always left of text */
}
.slotly-checkbox-label input[type="checkbox"] {
    margin: .2rem 0 0;
    width: 16px;
    height: 16px;
    accent-color: var(--sl-accent);
    cursor: pointer;
    justify-self: start;
}
.slotly-checkbox-label input[type="checkbox"]:focus-visible {
    outline: 3px solid var(--sl-accent-dark);
    outline-offset: 2px;
}
.slotly-checkbox-label a {
    color: var(--sl-accent-dark);
    text-decoration: underline;
}

/* ── Confirmation page — pending state ───────────────────────── */
.slotly-confirmation--pending .slotly-confirmation-icon--pending {
    color: var(--sl-accent-dark);
    font-size: 2.5rem;
}

/* ── Add-to-calendar buttons ──────────────────────────────────────────── */
.slotly-calendar-buttons {
    margin-top: 2rem;
    text-align: center;
}
.slotly-calendar-heading {
    font-size: 14px;
    color: var(--sl-muted, #6b7280);
    margin-bottom: .8rem;
}
.slotly-cal-btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    justify-content: center;
}
.slotly-cal-btn {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .5rem 1.1rem;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    color: #fff;
    background: #374151;
    transition: opacity .15s;
}
.slotly-cal-btn:hover          { opacity: .85; }
.slotly-cal-btn svg            { width: 16px; height: 16px; flex-shrink: 0; }
.slotly-cal-btn--google        { background: #fff; color: #374151; border: 1px solid #e5e7eb; }
.slotly-cal-btn--apple         { background: #1c1c1e; }
.slotly-cal-btn--outlook       { background: #0078d4; }
.slotly-cal-btn--yahoo         { background: #6001d2; }

/* ── Fully-booked slots (waitlist) ───────────────────────────── */
.slotly-slot--full {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .3rem;
    padding: .4rem .5rem;
    border: 1px dashed #d1d5db;
    border-radius: 6px;
    min-width: 80px;
    text-align: center;
}
.slotly-slot-time {
    font-size: 14px;
    color: #9ca3af;
}
.slotly-slot-full-badge {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #ef4444;
}
.slotly-slot-waitlist-btn {
    font-size: 11px;
    background: none;
    border: 1px solid var(--sl-accent);
    color: var(--sl-accent-dark);
    border-radius: 4px;
    padding: .2rem .5rem;
    cursor: pointer;
    line-height: 1.4;
}
.slotly-slot-waitlist-btn:hover,
.slotly-slot-waitlist-btn:focus-visible {
    background: var(--sl-accent);
    color: #fff;
    outline: none;
}

/* ── Waitlist inline form ────────────────────────────────────── */
.slotly-waitlist-form {
    grid-column: 1 / -1;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1rem;
    margin-top: .4rem;
}
.slotly-waitlist-form-title {
    margin: 0 0 .8rem;
    font-size: 14px;
    font-weight: 700;
}
.slotly-waitlist-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .5rem;
    margin-bottom: .6rem;
}
.slotly-waitlist-fields input {
    width: 100%;
    padding: .4rem .6rem;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    font-size: 13px;
}
.slotly-waitlist-fields input:focus-visible {
    outline: 2px solid var(--sl-accent);
    border-color: transparent;
}
.slotly-waitlist-error {
    color: #ef4444;
    font-size: 13px;
    margin-bottom: .4rem;
}
.slotly-waitlist-actions {
    display: flex;
    gap: .5rem;
}
.slotly-btn--waitlist-submit {
    background: var(--sl-accent);
    color: #fff;
    font-size: 13px;
    padding: .4rem 1rem;
}
.slotly-btn--waitlist-cancel {
    background: none;
    border: 1px solid #d1d5db;
    color: #6b7280;
    font-size: 13px;
    padding: .4rem 1rem;
}
.slotly-waitlist-success {
    color: #16a34a;
    font-size: 14px;
    font-weight: 600;
    margin: 0;
}

/* ── Intake questions ────────────────────────────────────────── */
.slotly-intake-questions {
    display: flex;
    flex-direction: column;
    gap: .9rem;
    margin-top: .4rem;
}
.slotly-question {}
.slotly-question-label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: .35rem;
}
.slotly-question-label .required {
    color: #ef4444;
}
.slotly-question-input,
.slotly-question-select,
.slotly-question-textarea {
    width: 100%;
    padding: .45rem .6rem;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    font-size: 14px;
    font-family: inherit;
    background: #fff;
}
.slotly-question-input:focus-visible,
.slotly-question-select:focus-visible,
.slotly-question-textarea:focus-visible {
    outline: 2px solid var(--sl-accent);
    border-color: transparent;
}
.slotly-question-options {
    display: flex;
    flex-direction: column;
    gap: .35rem;
}
.slotly-question-option {
    display: flex;
    align-items: center;
    gap: .45rem;
    font-size: 14px;
    cursor: pointer;
}
.slotly-question-error {
    display: block;
    color: #ef4444;
    font-size: 12px;
    margin-top: .2rem;
}
.slotly-question--error .slotly-question-input,
.slotly-question--error .slotly-question-select,
.slotly-question--error .slotly-question-textarea {
    border-color: #ef4444;
}

/* ── Booking offer confirmation ──────────────────────────────── */
.slotly-offer-confirm {
    max-width: 560px;
}
.slotly-offer-summary {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
}
.slotly-offer-title {
    margin: 0 0 1rem;
    font-size: 1.1rem;
}
.slotly-offer-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.slotly-offer-table th {
    text-align: left;
    color: #6b7280;
    font-weight: 500;
    padding: 6px 0;
    width: 110px;
}
.slotly-offer-table td {
    padding: 6px 0;
}
.slotly-offer-notes {
    margin-top: .8rem;
    padding: .75rem 1rem;
    background: #fff;
    border-left: 3px solid #3dd6c8;
    border-radius: 0 4px 4px 0;
    font-size: 13px;
    color: #374151;
}
.slotly-offer-details-form h4 {
    margin: 0 0 .8rem;
}
.slotly-offer-form .slotly-details-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .6rem;
}
.slotly-payment-option {
    display: block;
    margin-bottom: .4rem;
    font-size: 14px;
    cursor: pointer;
}

/* ── Contact form live validation ────────────────────────────── */
.slotly-contact-msg-label {
    display: block;
    font-size: 14px;
    margin-bottom: .35rem;
}
.slotly-contact-field-hint {
    color: #6b7280;
    font-weight: 400;
    font-size: 13px;
}
.slotly-contact-counter {
    font-size: 12px;
    margin-top: .25rem;
    min-height: 1.2em;
    transition: color .15s;
}
.slotly-contact-counter--under  { color: #6b7280; }
.slotly-contact-counter--warning { color: #d97706; font-weight: 600; }
.slotly-contact-counter--over   { color: #dc2626; font-weight: 700; }
.slotly-contact-link-warn {
    color: #92400e;
    background: #fef3c7;
    border: 1px solid #fcd34d;
    border-radius: 4px;
    padding: .35rem .6rem;
    font-size: 12px;
    margin-top: .35rem;
}
/* Disabled submit state */
.slotly-contact-submit:disabled,
.slotly-contact-submit[aria-disabled="true"] {
    opacity: .5;
    cursor: not-allowed;
    pointer-events: none;
}

/* ── Location selector / display ────────────────────────────── */
.slotly-location-picker {
    margin: .8rem 0 0;
}
.slotly-location-label {
    display: block;
    font-weight: 600;
    font-size: 14px;
}
.slotly-location-select {
    display: block;
    width: 100%;
    max-width: 380px;
    margin-top: .4rem;
    padding: .45rem .6rem;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    font-size: 14px;
    font-family: inherit;
    background: #fff;
}
.slotly-location-select:focus-visible {
    outline: 2px solid var(--sl-accent);
    border-color: transparent;
}
.slotly-location-display {
    display: flex;
    align-items: center;
    gap: .4rem;
    background: #f0fdfa;
    border: 1px solid #99f6e4;
    border-radius: 6px;
    padding: .6rem .9rem;
    font-size: 14px;
    margin-bottom: .8rem;
}
.slotly-location-icon {
    font-size: 16px;
    flex-shrink: 0;
}

/* ── Receipt link on confirmation page ──────────────────────── */
.slotly-receipt-link {
    margin-top: 1rem;
}
.slotly-receipt-btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: .55rem 1.1rem;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    text-decoration: none;
    transition: background .15s, border-color .15s;
}
.slotly-receipt-btn:hover,
.slotly-receipt-btn:focus-visible {
    background: #f0fdfa;
    border-color: var(--sl-accent);
    color: var(--sl-accent-dark);
    outline: none;
}
