/**
 * AC Appointments — Booking Widget Styles
 *
 * Multi-step frontend booking form. Self-contained, minimal theme conflicts.
 * Uses CSS custom properties for theming via primary_color setting.
 */

/* ── Variables ───────────────────────────────────────────── */

.ac-booking-widget {
    --ac-bw-primary: #0073aa;
    --ac-bw-primary-hover: #005a87;
    --ac-bw-primary-light: #e8f4fc;
    --ac-bw-danger: #d63638;
    --ac-bw-success: #00a32a;
    --ac-bw-success-bg: #d4edda;
    --ac-bw-bg: #f9fafb;
    --ac-bw-card: #fff;
    --ac-bw-border: #dcdde1;
    --ac-bw-text: #1d2327;
    --ac-bw-text-muted: #646970;
    --ac-bw-radius: 10px;
    --ac-bw-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);

    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 16px;
    color: var(--ac-bw-text);
    line-height: 1.5;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    box-sizing: border-box;
}

.ac-booking-widget *, .ac-booking-widget *::before, .ac-booking-widget *::after {
    box-sizing: border-box;
}

/* Ensure the Elementor shortcode wrapper stretches to full column width */
.elementor-widget-shortcode:has(.ac-booking-widget) {
    width: 100%;
    flex-grow: 1;
}

/* ── Loading State ───────────────────────────────────────── */

.ac-bw-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 72px 24px;
    color: var(--ac-bw-text-muted);
    font-size: 16px;
}

.ac-bw-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--ac-bw-border);
    border-top-color: var(--ac-bw-primary);
    border-radius: 50%;
    animation: ac-bw-spin 0.7s linear infinite;
}

@keyframes ac-bw-spin {
    to { transform: rotate(360deg); }
}

.ac-bw-spinner--small {
    width: 22px;
    height: 22px;
    border-width: 2px;
}

.ac-bw-inline-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px 0;
    color: var(--ac-bw-text-muted);
    font-size: 15px;
    animation: ac-bw-fadeIn 0.2s ease;
}

/* ── Step Container ──────────────────────────────────────── */

.ac-bw-step {
    display: none;
    animation: ac-bw-fadeIn 0.25s ease;
    width: 100%;
}

.ac-bw-step.ac-bw-step--active {
    display: block;
}

@keyframes ac-bw-fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ── Progress Bar ────────────────────────────────────────── */

.ac-bw-progress {
    display: flex;
    gap: 5px;
    margin-bottom: 28px;
}

.ac-bw-progress-step {
    flex: 1;
    height: 5px;
    border-radius: 3px;
    background: var(--ac-bw-border);
    transition: background 0.3s;
}

.ac-bw-progress-step.ac-bw-progress-step--done,
.ac-bw-progress-step.ac-bw-progress-step--active {
    background: var(--ac-bw-primary);
}

/* ── Step Header ─────────────────────────────────────────── */

.ac-bw-step-header {
    margin-bottom: 24px;
}

.ac-bw-step-header h3 {
    margin: 0 0 4px;
    font-size: 22px;
    font-weight: 600;
    color: var(--ac-bw-text);
}

.ac-bw-step-subtitle {
    color: var(--ac-bw-text-muted);
    font-size: 15px;
    margin: 0;
}

/* ── Option Cards (Location / Service / Provider) ────────── */

.ac-bw-options {
    display: grid;
    gap: 12px;
    width: 100%;
}

.ac-bw-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 2px solid var(--ac-bw-border);
    border-radius: var(--ac-bw-radius);
    background: var(--ac-bw-card);
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
    min-width: 0;
    overflow: hidden;
}

.ac-bw-option:hover {
    border-color: var(--ac-bw-primary);
    box-shadow: var(--ac-bw-shadow);
}

.ac-bw-option.ac-bw-option--selected {
    border-color: var(--ac-bw-primary);
    background: var(--ac-bw-primary-light);
}

.ac-bw-option-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--ac-bw-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 18px;
    color: var(--ac-bw-primary);
    overflow: hidden;
}

/* ACSD - The icons are drawn, not typed: an emoji is rendered by the
   operating system and a Windows alarm clock is a pink cartoon that belongs
   to no site. These follow the accent colour like everything else. */
.ac-bw-option-icon svg {
    width: 21px;
    height: 21px;
    display: block;
}

.ac-bw-option-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.ac-bw-option-info {
    flex: 1;
    min-width: 0;
}

.ac-bw-option-name {
    font-weight: 600;
    font-size: 16px;
    margin: 0;
    /* ACSD - long single words (service names) must wrap inside their column
       instead of spilling over the price on the right. */
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* ACSD - Service cards that offer several durations: the name sits on its own
   row and each duration is a radio underneath, so a long title and a price can
   never collide on a narrow screen. */
.ac-bw-service-option--multi {
    flex-direction: column;
    align-items: stretch;
    cursor: default;
    /* No gap while folded shut: the card should be exactly one row tall. */
    gap: 0;
}

.ac-bw-service-option--multi.is-open {
    gap: 10px;
}

.ac-bw-service-head {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

/* ACSD - the row that folds the durations open. */
.ac-bw-service-head--toggle {
    cursor: pointer;
    user-select: none;
}

.ac-bw-service-head--toggle:focus-visible {
    outline: 2px solid var(--ac-bw-primary);
    outline-offset: 2px;
    border-radius: 6px;
}

.ac-bw-service-summary {
    font-size: 13px;
    font-weight: 600;
    color: var(--ac-bw-primary);
    white-space: nowrap;
    flex-shrink: 0;
    margin-left: auto;
}

/* A chevron drawn from two borders, so no icon font is needed. */
.ac-bw-service-caret {
    width: 9px;
    height: 9px;
    flex-shrink: 0;
    border-right: 2px solid var(--ac-bw-text-muted);
    border-bottom: 2px solid var(--ac-bw-text-muted);
    transform: rotate(45deg) translate(-2px, -2px);
    transition: transform 0.18s ease;
}

.ac-bw-service-option.is-open .ac-bw-service-caret {
    transform: rotate(-135deg) translate(-2px, -2px);
    border-color: var(--ac-bw-primary);
}

.ac-bw-service-option.is-open {
    border-color: var(--ac-bw-primary);
}

.ac-bw-service-option--multi:hover {
    border-color: var(--ac-bw-border);
    box-shadow: none;
}

.ac-bw-duration-choices {
    display: grid;
    gap: 8px;
}

/* ACSD - the markup ships these collapsed with the `hidden` attribute, which
   works through the UA stylesheet's `display: none`. The `display: grid`
   above is an author rule, so it beat `hidden` and every service card came
   up expanded. Restore the attribute's meaning explicitly. */
.ac-bw-duration-choices[hidden] {
    display: none;
}

.ac-bw-duration-choice {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--ac-bw-border);
    border-radius: calc(var(--ac-bw-radius) - 2px);
    background: var(--ac-bw-bg);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    min-width: 0;
}

.ac-bw-duration-choice:hover {
    border-color: var(--ac-bw-primary);
}

.ac-bw-duration-choice input[type="radio"] {
    width: 18px;
    height: 18px;
    margin: 0;
    flex-shrink: 0;
    accent-color: var(--ac-bw-primary);
    cursor: pointer;
}

.ac-bw-duration-choice:has(input:checked) {
    border-color: var(--ac-bw-primary);
    background: var(--ac-bw-primary-light);
}

.ac-bw-duration-choice-label {
    flex: 1;
    min-width: 0;
    font-size: 15px;
    font-weight: 500;
}

.ac-bw-duration-choice-price {
    font-size: 14px;
    font-weight: 600;
    color: var(--ac-bw-primary);
    white-space: nowrap;
    flex-shrink: 0;
}

/* ACSD - The line under a service's name. It was one line at 14px, cut with
   an ellipsis wherever the card ended, which on a phone was four or five
   words - not enough to tell a deep tissue massage from a therapeutic one.
   Two lines at 12px carry about forty characters more and the card grows by
   a few pixels, not by a row. */
.ac-bw-option-desc {
    font-size: 12px;
    line-height: 1.45;
    color: var(--ac-bw-text-muted);
    margin: 3px 0 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ac-bw-option-meta {
    font-size: 13px;
    font-weight: 600;
    color: var(--ac-bw-primary);
    white-space: nowrap;
    flex-shrink: 0;
    /* ACSD - never let the price squeeze the name column to nothing. */
    max-width: 45%;
}

/* Neutralize host-theme content spacing (e.g. .entry-content p { margin-bottom: 1.6em })
   that leaks into the widget when it is embedded inside post content. The theme's
   `.entry-content p` rule has higher specificity than the widget's own margin rules,
   so it wins and adds unwanted spacing to option names. Scoped to the widget root and
   flagged !important so it overrides the theme regardless of specificity or CSS load order.
   The widget defines all its own spacing via container gaps and explicit margins, so it
   never relies on a default paragraph bottom margin. */
.ac-booking-widget p {
    margin-bottom: 0 !important;
}

/* ── Calendar ────────────────────────────────────────────── */

.ac-bw-calendar {
    background: var(--ac-bw-card);
    border: 1px solid var(--ac-bw-border);
    border-radius: var(--ac-bw-radius);
    padding: 28px;
    box-shadow: var(--ac-bw-shadow);
}

.ac-bw-calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.ac-bw-calendar-title {
    font-weight: 600;
    font-size: 20px;
}

.ac-bw-calendar-nav {
    display: flex;
    gap: 6px;
}

.ac-bw-calendar-nav button {
    background: none;
    border: 1px solid var(--ac-bw-border);
    border-radius: 6px;
    width: 42px;
    height: 42px;
    padding: 0;
    margin: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    line-height: 1;
    color: var(--ac-bw-text);
    transition: background 0.15s;
}

.ac-bw-calendar-nav button svg {
    display: block;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.ac-bw-calendar-nav button:hover {
    background: var(--ac-bw-bg);
}

.ac-bw-calendar-nav button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.ac-bw-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    text-align: center;
}

.ac-bw-calendar-day-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--ac-bw-text-muted);
    padding: 8px 0;
    text-transform: uppercase;
}

.ac-bw-calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 16px;
    cursor: default;
    color: var(--ac-bw-text-muted);
    transition: background 0.15s, color 0.15s;
}

.ac-bw-calendar-day--available {
    color: var(--ac-bw-text);
    font-weight: 600;
    cursor: pointer;
}

.ac-bw-calendar-day--available:hover {
    background: var(--ac-bw-primary-light);
}

.ac-bw-calendar-day--selected {
    background: var(--ac-bw-primary) !important;
    color: #fff !important;
}

.ac-bw-calendar-day--today {
    border: 2px solid var(--ac-bw-primary);
}

.ac-bw-calendar-day--other-month {
    color: #ccc;
}

.ac-bw-calendar-day--unavailable {
    color: #d0d0d0;
    text-decoration: line-through;
}

.ac-bw-calendar-loading {
    display: flex;
    justify-content: center;
    padding: 48px;
}

/* ── Time Slots ──────────────────────────────────────────── */

.ac-bw-slots {
    display: grid;
    /* ACSD - four per row, tighter, so a full day fits without endless scroll. */
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-top: 16px;
}

.ac-bw-slot {
    padding: 10px 6px;
    text-align: center;
    border: 2px solid var(--ac-bw-border);
    border-radius: var(--ac-bw-radius);
    background: var(--ac-bw-card);
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: border-color 0.15s, background 0.15s;
}

.ac-bw-slot:hover {
    border-color: var(--ac-bw-primary);
    background: var(--ac-bw-primary-light);
}

.ac-bw-slot.ac-bw-slot--selected {
    border-color: var(--ac-bw-primary);
    background: var(--ac-bw-primary);
    color: #fff;
}

.ac-bw-slot-seats {
    display: block;
    font-size: 12px;
    font-weight: 400;
    color: var(--ac-bw-text-muted);
    margin-top: 3px;
}

.ac-bw-slot--selected .ac-bw-slot-seats {
    color: rgba(255, 255, 255, 0.8);
}

/* ── Form Fields ─────────────────────────────────────────── */

.ac-bw-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Legacy .ac-bw-field (kept for backward compat) */
.ac-bw-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ac-bw-field label {
    font-size: 15px;
    font-weight: 600;
    color: var(--ac-bw-text);
}

.ac-bw-field label .ac-bw-required {
    color: var(--ac-bw-danger);
    margin-left: 2px;
}

.ac-bw-field input[type="text"],
.ac-bw-field input[type="email"],
.ac-bw-field input[type="tel"],
.ac-bw-field input[type="number"],
.ac-bw-field textarea,
.ac-bw-field select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--ac-bw-border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 16px;
    line-height: 1.4;
    background: #fff;
    color: var(--ac-bw-text);
    transition: border-color 0.15s;
}

.ac-bw-field input:focus,
.ac-bw-field textarea:focus,
.ac-bw-field select:focus {
    border-color: var(--ac-bw-primary);
    outline: 2px solid rgba(0, 115, 170, 0.15);
    outline-offset: 0;
}

.ac-bw-field textarea {
    resize: vertical;
    min-height: 90px;
}

/* ── Floating Label Fields ─────────────────────────────── */

.ac-bw-float-field {
    position: relative;
    margin-bottom: 0;
}

.ac-bw-float-field input,
.ac-bw-float-field textarea,
.ac-bw-float-field select {
    width: 100%;
    padding: 20px 14px 8px;
    border: none;
    border-bottom: 2px solid var(--ac-bw-border);
    border-radius: 0;
    font-family: inherit;
    font-size: 16px;
    line-height: 1.4;
    background: transparent;
    color: var(--ac-bw-text);
    transition: border-color 0.2s ease;
    outline: none;
}

.ac-bw-float-field label {
    position: absolute;
    left: 14px;
    top: 14px;
    font-size: 16px;
    font-weight: 400;
    color: var(--ac-bw-text-muted);
    pointer-events: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: left top;
}

.ac-bw-float-field label .ac-bw-required {
    color: var(--ac-bw-danger);
    margin-left: 1px;
}

/* Float the label up on focus or when filled */
.ac-bw-float-field input:focus ~ label,
.ac-bw-float-field input:not(:placeholder-shown) ~ label,
.ac-bw-float-field textarea:focus ~ label,
.ac-bw-float-field textarea:not(:placeholder-shown) ~ label,
.ac-bw-float-field select ~ label {
    top: 2px;
    font-size: 12px;
    font-weight: 600;
    color: var(--ac-bw-primary);
    letter-spacing: 0.3px;
}

/* Bottom border on focus */
.ac-bw-float-field input:focus,
.ac-bw-float-field textarea:focus,
.ac-bw-float-field select:focus {
    border-bottom-color: var(--ac-bw-primary);
    box-shadow: none;
    outline: none;
}

/* Textarea variant */
.ac-bw-float-field--textarea textarea {
    resize: vertical;
    min-height: 80px;
}

/* ── Error states (both legacy + floating) ─────────────── */

.ac-bw-field-error {
    font-size: 13px;
    color: var(--ac-bw-danger);
    display: none;
}

.ac-bw-field--invalid input,
.ac-bw-field--invalid textarea {
    border-color: var(--ac-bw-danger) !important;
    border-bottom-color: var(--ac-bw-danger) !important;
}

.ac-bw-field--invalid .ac-bw-field-error {
    display: block;
}

.ac-bw-field--invalid label {
    color: var(--ac-bw-danger) !important;
}

.ac-bw-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.ac-bw-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    cursor: pointer;
}

.ac-bw-checkbox label {
    font-size: 15px;
    font-weight: 400;
    cursor: pointer;
}

/* Select elements — ensure native dropdown arrow */
.ac-bw-float-field select {
    appearance: auto;
    -webkit-appearance: auto;
    cursor: pointer;
}

/* ── Two-column Row ─────────────────────────────────────── */

.ac-bw-row {
    display: flex;
    gap: 12px;
}

.ac-bw-col-half {
    flex: 1;
    min-width: 0;
}

/* ── Billing Type Toggle ────────────────────────────────── */

.ac-bw-billing-type {
    display: flex;
    gap: 16px;
    margin: 8px 0 4px;
    padding: 8px 0;
}

.ac-bw-radio-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    color: var(--ac-bw-text);
}

.ac-bw-radio-label input[type="radio"] {
    width: 16px;
    height: 16px;
    accent-color: var(--ac-bw-primary);
    cursor: pointer;
}

/* ── Gift Booking ───────────────────────────────────────── */

.ac-bw-gift-toggle {
    margin: 8px 0 0;
}

.ac-bw-gift-fields {
    background: #fffbeb;
    border: 1px dashed #f59e0b;
    border-radius: 10px;
    padding: 14px 14px 4px;
    margin: 4px 0 8px;
}

.ac-bw-gift-note {
    font-size: 13px;
    color: #92400e;
    margin: 0 0 10px;
}

/* ── CUI Lookup Status ──────────────────────────────────── */

.ac-bw-cui-status {
    font-size: 13px;
    padding: 6px 10px;
    border-radius: 6px;
    margin: -4px 0 8px;
}

.ac-bw-cui-loading {
    color: #666;
    font-style: italic;
}

.ac-bw-cui-ok {
    color: #16a34a;
    background: #f0fdf4;
}

.ac-bw-cui-error {
    color: #dc2626;
    background: #fef2f2;
}

/* ── Seats Selector ──────────────────────────────────────── */

.ac-bw-seats {
    margin-top: 14px;
}

.ac-bw-seats label {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 6px;
    display: block;
}

.ac-bw-seats select {
    width: auto;
    min-width: 90px;
    padding: 8px 12px;
    border: 1px solid var(--ac-bw-border);
    border-radius: 6px;
    font-size: 16px;
}

/* ── Action Buttons ──────────────────────────────────────── */

.ac-bw-actions {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    margin-top: 28px;
}

.ac-bw-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, opacity 0.15s;
    min-width: 140px;
    text-decoration: none;
}

.ac-bw-btn--primary {
    background: var(--ac-bw-primary);
    color: #fff;
}

.ac-bw-btn--primary:hover {
    background: var(--ac-bw-primary-hover);
}

.ac-bw-btn--secondary {
    background: var(--ac-bw-bg);
    color: var(--ac-bw-text);
    border: 1px solid var(--ac-bw-border);
}

.ac-bw-btn--secondary:hover {
    background: #e9e9ea;
}

.ac-bw-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ACSD - Code field and "Apply" on one line. The field used to carry its
   sizing inline while the button took the width:100% every button gets on a
   phone, so on a phone the field was squeezed to a square the size of two
   letters and the button filled the row. */
.ac-bw-coupon-row {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.ac-bw-coupon-row input {
    flex: 1 1 auto;
    min-width: 0;
    padding: 12px 14px;
    border: 1px solid var(--ac-bw-border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 16px;
    text-transform: uppercase;
}

.ac-bw-coupon-row .ac-bw-btn {
    flex: 0 0 auto;
    width: auto;
    min-width: 0;
    padding: 12px 20px;
}

/* ── Confirmation ────────────────────────────────────────── */

.ac-bw-confirmation {
    text-align: center;
    padding: 36px 0;
}

.ac-bw-confirmation-icon {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: var(--ac-bw-success-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 36px;
    color: var(--ac-bw-success);
    box-shadow: 0 4px 12px rgba(0, 184, 148, 0.2);
}

.ac-bw-confirmation h3 {
    margin: 0 0 10px;
    font-size: 26px;
    color: var(--ac-bw-text);
    font-weight: 700;
}

.ac-bw-confirmation-greeting {
    color: var(--ac-bw-text);
    font-size: 17px;
    margin: 0 0 8px;
    line-height: 1.5;
}

.ac-bw-confirmation-greeting strong {
    color: var(--ac-bw-primary);
}

.ac-bw-confirmation-message {
    color: var(--ac-bw-text-muted);
    font-size: 15px;
    margin: 0 0 28px;
}

.ac-bw-confirmation-details {
    display: flex;
    flex-direction: column;
    gap: 0;
    background: var(--ac-bw-bg);
    border: 1px solid var(--ac-bw-border);
    border-radius: var(--ac-bw-radius);
    padding: 0;
    text-align: left;
    font-size: 15px;
    max-width: 440px;
    margin: 0 auto;
    overflow: hidden;
}

.ac-bw-confirmation-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
    border-bottom: 1px solid var(--ac-bw-border);
}

.ac-bw-confirmation-row:last-child {
    border-bottom: none;
}

.ac-bw-confirmation-label {
    font-size: 14px;
    color: var(--ac-bw-text-muted);
    font-weight: 500;
}

.ac-bw-confirmation-value {
    font-size: 15px;
    color: var(--ac-bw-text);
    font-weight: 600;
    text-align: right;
}

.ac-bw-confirmation-ref {
    color: var(--ac-bw-primary);
    font-family: monospace;
    letter-spacing: 0.5px;
}

.ac-bw-confirmation-details strong {
    color: var(--ac-bw-text);
}

/* ── Error Banner ────────────────────────────────────────── */

.ac-bw-error {
    padding: 14px 18px;
    border-radius: var(--ac-bw-radius);
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: var(--ac-bw-danger);
    font-size: 15px;
    margin-bottom: 20px;
    display: none;
}

.ac-bw-error.ac-bw-error--visible {
    display: block;
}

/* ── Summary Bar ─────────────────────────────────────────── */

.ac-bw-summary {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 20px;
    padding: 14px 20px;
    background: var(--ac-bw-bg);
    border-radius: var(--ac-bw-radius);
    border: 1px solid var(--ac-bw-border);
    font-size: 15px;
}

.ac-bw-summary-item {
    display: flex;
    gap: 6px;
}

.ac-bw-summary-label {
    color: var(--ac-bw-text-muted);
}

.ac-bw-summary-value {
    font-weight: 600;
    color: var(--ac-bw-text);
}

/* ── Responsive ──────────────────────────────────────────── */

@media screen and (max-width: 480px) {
    .ac-booking-widget {
        padding: 0;
        font-size: 15px;
    }

    .ac-bw-step-header h3 {
        font-size: 19px;
    }

    .ac-bw-option {
        padding: 14px;
        gap: 12px;
    }

    .ac-bw-option-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .ac-bw-option-name {
        font-size: 15px;
    }

    .ac-bw-slots {
        /* Four still fit at 480px and below: 4 x ~66px at the narrowest. */
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
    }

    .ac-bw-slot {
        padding: 10px 4px;
        font-size: 14px;
    }

    .ac-bw-actions {
        flex-direction: column-reverse;
    }

    .ac-bw-btn {
        width: 100%;
    }

    .ac-bw-coupon-row .ac-bw-btn {
        width: auto;
    }

    .ac-bw-calendar {
        padding: 14px;
    }

    .ac-bw-calendar-nav button {
        width: 34px;
        height: 34px;
    }

    .ac-bw-confirmation h3 {
        font-size: 22px;
    }
}

/* ── ACSD - "Sending your booking" panel ─────────────────────── */

.ac-bw-submitting {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    padding: 14px 16px;
    border: 2px solid var(--ac-bw-primary);
    border-radius: var(--ac-bw-radius);
    background: var(--ac-bw-primary-light);
}

.ac-bw-submitting-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.ac-bw-submitting-text strong {
    font-size: 15px;
    color: var(--ac-bw-primary);
}

.ac-bw-submitting-text span {
    font-size: 13px;
    color: var(--ac-bw-text-muted);
}

/* ACSD - Offers: a separate question from the appointment, so the channels
   stay out of the way until the client says yes. */
.ac-bw-marketing-channels {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin: -4px 0 14px 26px;
    font-size: 14px;
}

.ac-bw-marketing-channels[hidden] { display: none; }

.ac-bw-marketing-where {
    color: #6c7781;
    font-size: 13px;
}

.ac-bw-marketing-channel {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

/* ACSD - The answer to a typed voucher code, while it can still be fixed. */
.ac-bw-voucher-note {
    margin: 4px 0 0;
    font-size: 13px;
}

.ac-bw-voucher-note.is-ok  { color: #1a7f5a; }
.ac-bw-voucher-note.is-bad { color: #b32d2e; }

/* ACSD - Abonamente on the last step: either "you have one, it covers this"
   or "this address has one, prove it is you". Set apart from the rest of the
   form because it is the one block that changes what the appointment costs. */
.ac-bw-subscription {
    margin: 14px 0 4px;
    padding: 14px 16px;
    border-radius: 10px;
    border: 1px solid #d8e6df;
    background: #f3faf7;
}

.ac-bw-subscription-ask {
    border-radius: 10px;
}

.ac-bw-subscription-ask p {
    margin: 0 0 10px;
    font-size: 14px;
    line-height: 1.5;
}

.ac-bw-subscription-ok .ac-bw-checkbox {
    margin: 0;
}

.ac-bw-subscription-note {
    margin: 6px 0 0 26px;
    font-size: 13px;
    line-height: 1.5;
    color: #30594a;
}

.ac-bw-subscription .ac-bw-row {
    align-items: flex-end;
    gap: 10px;
}

/* ACSD - The sentence shown when no code was sent. Same size as its
   neighbours, in the colour the form uses for "this did not work". */
.ac-bw-subscription-note--bad {
    margin-left: 0;
    color: #b42318;
}

.ac-bw-btn-small {
    padding: 9px 16px;
    font-size: 14px;
    width: auto;
}

@media (max-width: 520px) {
    .ac-bw-subscription .ac-bw-row {
        flex-direction: column;
        align-items: stretch;
    }

    .ac-bw-subscription .ac-bw-btn-small {
        width: 100%;
    }
}

/* ACSD - The abonament offered on the confirmation screen. A quiet card, not
   a banner: the appointment is the news, this is a footnote to it. */
.ac-bw-abonament-offer {
    display: block;
    margin: 18px 0 0;
    padding: 14px 16px;
    border: 1px solid #d8e6df;
    border-radius: 10px;
    background: #f3faf7;
    text-decoration: none;
    color: inherit;
}

.ac-bw-abonament-offer:hover {
    border-color: #1a7f5a;
}

.ac-bw-abonament-title {
    display: block;
    font-weight: 600;
    font-size: 15px;
}

.ac-bw-abonament-sub {
    display: block;
    margin-top: 2px;
    font-size: 13px;
    color: #30594a;
}

/* ACSD - Where the appointment happens: shown only for services that are
   offered at the client's address, so most forms never see any of this. */
.ac-bw-place {
    margin: 14px 0 4px;
}

.ac-bw-place-choice {
    border: 1px solid var(--ac-bw-border, #e2e8e6);
    border-radius: 8px;
    padding: 10px 12px;
    margin: 0 0 10px;
}

.ac-bw-place-choice legend {
    padding: 0 6px;
    font-size: 13px;
    font-weight: 600;
}

.ac-bw-place-choice .ac-bw-checkbox {
    margin: 4px 0;
}

.ac-bw-place-note {
    margin: 0 0 8px;
    font-size: 13px;
    color: #30594a;
}

/* ACSD - What this client pays, after the server has looked at their
   e-mail: the first-session price belongs to somebody who has never been
   here, and the form says which one they got rather than letting the figure
   change silently. */
.ac-bw-price-note {
    margin: 10px 0 14px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #f4faf7;
    border: 1px solid #cfe3d9;
    font-size: 14px;
}

.ac-bw-price-note s {
    color: #7b8c85;
    margin-right: 4px;
}

.ac-bw-price-note strong {
    font-size: 16px;
}

.ac-bw-price-note-badge {
    display: inline-block;
    margin-right: 6px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #30594a;
}

.ac-bw-price-was {
    color: #7b8c85;
    margin-right: 4px;
}

.ac-bw-price-now {
    font-weight: 700;
}

.ac-bw-price-for {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #30594a;
}

/* ACSD - "You pay now, we ring you about the hour." Said before the form,
   because a client paying for an appointment with no hour on it deserves to
   read why in something more than small print. */
.ac-bw-home-note {
    margin: 0 0 16px;
    padding: 14px 16px;
    border: 1px solid #cfe3d9;
    border-left: 3px solid #30594a;
    border-radius: 6px;
    background: #f4faf7;
}

.ac-bw-home-note strong {
    display: block;
    margin-bottom: 4px;
    color: #1f3d32;
    font-size: 14px;
}

.ac-bw-home-note p {
    margin: 0;
    color: #40574e;
    font-size: 13px;
    line-height: 1.5;
}

.ac-bw-place textarea {
    width: 100%;
    min-height: 56px;
    resize: vertical;
}

/* ACSD - card now or pay at the practice */
.ac-bw-paychoice { border: 0; margin: 4px 0 14px; padding: 0; }
.ac-bw-paychoice legend { font-weight: 600; font-size: 14px; margin-bottom: 8px; padding: 0; }
.ac-bw-paychoice-opt { display: flex; align-items: center; gap: 10px; padding: 11px 14px; margin-bottom: 8px; border: 1px solid #dcdfe3; border-radius: 10px; cursor: pointer; font-size: 14px; }
.ac-bw-paychoice-opt:has(input:checked) { border-color: var(--ac-bw-primary, #0073aa); box-shadow: 0 0 0 1px var(--ac-bw-primary, #0073aa); }
.ac-bw-paychoice-opt input { accent-color: var(--ac-bw-primary, #0073aa); margin: 0; }
