/* ==========================================================================
   Ara Booking Form - Public Styles
   Brand: Dark Teal #122E33, Teal #4C8590, Orange #F18A2D
   ========================================================================== */

/* Form container */
.ara-booking-form {
    width: 100%;
    max-width: 100%;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    padding: 40px 48px;
    font-family: inherit;
    box-sizing: border-box;
}

/* Step indicator */
.ara-booking-steps {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-bottom: 40px;
    padding-bottom: 24px;
    border-bottom: 1px solid #eee;
}

.ara-booking-step {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #aaa;
    font-size: 15px;
    cursor: default;
    transition: color 0.2s;
}

.ara-booking-step.active {
    color: #122E33;
    font-weight: 600;
}

.ara-step-num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ddd;
    font-size: 14px;
    flex-shrink: 0;
    transition: all 0.2s;
}

.ara-booking-step.active .ara-step-num {
    border-color: #F18A2D;
    background: #F18A2D;
    color: #fff;
}

/* Type cards */
.ara-booking-type-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.ara-booking-type-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    border: 2px solid #e8e8e8;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.ara-booking-type-card:hover {
    border-color: #4C8590;
    background: #f8fafb;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(76, 133, 144, 0.15);
}

.ara-booking-type-card.selected {
    border-color: #4C8590;
    background: #eef4f5;
    box-shadow: 0 0 0 1px #4C8590;
}

.ara-booking-type-color {
    width: 6px;
    height: 44px;
    border-radius: 3px;
    flex-shrink: 0;
}

.ara-booking-type-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ara-booking-type-info strong {
    font-size: 16px;
    color: #122E33;
}

.ara-booking-type-info span {
    font-size: 13px;
    color: #666;
}

/* Calendar + slots layout */
.ara-booking-calendar-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

.ara-booking-calendar {
    min-width: 0;
}

.ara-booking-slots-wrap {
    min-width: 0;
}

/* Calendar header */
.ara-cal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.ara-cal-prev,
.ara-cal-next {
    background: none;
    border: 1px solid #e0e0e0;
    font-size: 16px;
    cursor: pointer;
    padding: 8px 12px;
    color: #333;
    border-radius: 6px;
    transition: all 0.2s;
}

.ara-cal-prev:hover,
.ara-cal-next:hover {
    background: #eef4f5;
    border-color: #4C8590;
    color: #4C8590;
}

.ara-cal-title {
    font-weight: 600;
    font-size: 18px;
    color: #122E33;
}

/* Calendar grid */
.ara-cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: #888;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f0f0f0;
}

.ara-cal-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.ara-cal-day {
    position: relative;
    text-align: center;
    padding: 10px 4px;
    border-radius: 8px;
    cursor: default;
    font-size: 15px;
    color: #ccc;
    transition: all 0.15s;
}

.ara-cal-day.available {
    cursor: pointer;
    color: #333;
    font-weight: 500;
}

.ara-cal-day.available:hover {
    background: #eef4f5;
    color: #122E33;
}

.ara-cal-day.selected {
    background: #4C8590;
    color: #fff;
    font-weight: 600;
}

.ara-cal-day.past {
    color: #d5d5d5;
}

.ara-cal-day.today {
    font-weight: 700;
}

/* Availability dot */
.ara-cal-dot {
    display: none;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #F18A2D;
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
}

.ara-cal-day.available .ara-cal-dot {
    display: block;
}

.ara-cal-day.selected .ara-cal-dot {
    background: #fff;
}

/* Calendar loading overlay */
.ara-cal-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px 0;
}

.ara-cal-loading .ara-booking-spinner {
    display: block;
}

/* Time slots */
.ara-booking-slots {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.ara-slots-placeholder {
    grid-column: 1 / -1;
    text-align: center;
    color: #999;
    font-size: 14px;
    padding: 40px 0;
}

.ara-booking-time-slot {
    padding: 12px 8px;
    border: 2px solid #e8e8e8;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    transition: all 0.2s;
}

.ara-booking-time-slot:hover {
    border-color: #4C8590;
    background: #f8fafb;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(76, 133, 144, 0.15);
}

.ara-booking-time-slot.selected {
    background: #4C8590;
    border-color: #4C8590;
    color: #fff;
    box-shadow: 0 2px 8px rgba(76, 133, 144, 0.3);
}

/* Form fields */
.ara-booking-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 24px;
}

.ara-booking-fields label {
    display: block;
    font-weight: 500;
    font-size: 14px;
    color: #333;
}

.ara-booking-fields label:last-child {
    grid-column: 1 / -1;
}

.ara-booking-fields input,
.ara-booking-fields textarea {
    display: block;
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #e8e8e8;
    border-radius: 8px;
    font-size: 15px;
    margin-top: 6px;
    box-sizing: border-box;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.ara-booking-fields input:focus,
.ara-booking-fields textarea:focus {
    border-color: #4C8590;
    outline: none;
    box-shadow: 0 0 0 3px rgba(76, 133, 144, 0.15);
}

/* DOB field group */
.ara-dob-fieldset {
    border: 2px solid #e8e8e8;
    border-radius: 8px;
    padding: 12px 16px 16px;
    margin: 0;
    grid-column: 1;
}

.ara-dob-fieldset legend {
    font-weight: 500;
    font-size: 14px;
    color: #333;
    padding: 0 4px;
}

.ara-dob-dropdowns {
    display: flex;
    gap: 8px;
}

.ara-dob-dropdowns select {
    flex: 1;
    padding: 10px 12px;
    border: 2px solid #e8e8e8;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    background: #fff;
    color: #333;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.ara-dob-dropdowns select:focus {
    border-color: #4C8590;
    outline: none;
    box-shadow: 0 0 0 3px rgba(76, 133, 144, 0.15);
}

/* Select elements (relationship dropdown, etc.) */
.ara-booking-fields select {
    display: block;
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #e8e8e8;
    border-radius: 8px;
    font-size: 15px;
    margin-top: 6px;
    box-sizing: border-box;
    font-family: inherit;
    background: #fff;
    color: #333;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.ara-booking-fields select:focus {
    border-color: #4C8590;
    outline: none;
    box-shadow: 0 0 0 3px rgba(76, 133, 144, 0.15);
}

/* Consent checkbox groups */
.ara-consent-group {
    grid-column: 1 / -1;
    margin-top: 8px;
}

.ara-consent-group-label {
    font-weight: 600;
    font-size: 14px;
    color: #333;
    margin-bottom: 8px;
}

.ara-consent-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 0;
    cursor: pointer;
}

.ara-consent-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-width: 18px;
    margin-top: 2px;
    accent-color: #4C8590;
    cursor: pointer;
}

.ara-consent-checkbox span {
    font-size: 14px;
    color: #333;
    line-height: 1.4;
}

/* On-behalf toggle */
.ara-on-behalf-toggle {
    grid-column: 1 / -1;
    padding: 12px 16px;
    background: #f8fafb;
    border: 2px solid #e8e8e8;
    border-radius: 8px;
    margin-bottom: 4px;
}

.ara-on-behalf-toggle label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    font-size: 15px;
    color: #333;
    cursor: pointer;
}

.ara-on-behalf-toggle input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-width: 18px;
    accent-color: #4C8590;
    cursor: pointer;
}

/* On-behalf fields */
.ara-on-behalf-fields {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 24px;
    padding: 16px 0;
    border-top: 1px solid #e8e8e8;
    margin-top: 8px;
}

.ara-on-behalf-consent-text {
    grid-column: 1 / -1;
    font-size: 14px;
    color: #555;
    line-height: 1.5;
    padding: 8px 12px;
    background: #f9f9f9;
    border-radius: 6px;
    margin: 0;
}

.ara-on-behalf-consent-label {
    grid-column: 1 / -1;
}

/* Service intro text */
.ara-service-intro {
    grid-column: 1 / -1;
    margin-bottom: 4px;
}

.ara-service-intro p {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
    margin: 0;
    padding: 12px 16px;
    background: #f8fafb;
    border-left: 3px solid #4C8590;
    border-radius: 0 8px 8px 0;
}

/* Safeguarding block */
.ara-safeguarding-block {
    grid-column: 1 / -1;
    padding: 16px 20px;
    background: #fff8e1;
    border: 1px solid #ffe082;
    border-radius: 8px;
    color: #5d4037;
    font-size: 14px;
    line-height: 1.6;
}

.ara-safeguarding-block a {
    color: #4C8590;
    text-decoration: underline;
}

/* Step 4 booker section */
.ara-booker-section {
    grid-column: 1 / -1;
    border-top: 2px solid #e8e8e8;
    padding-top: 20px;
    margin-top: 8px;
}

.ara-booker-section h4 {
    font-size: 16px;
    font-weight: 600;
    color: #122E33;
    margin: 0 0 16px 0;
}

.ara-booker-section .ara-booking-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 24px;
}

/* Disclaimer */
.ara-disclaimer {
    grid-column: 1 / -1;
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    padding: 12px 16px;
    background: #f9f9f9;
    border-radius: 6px;
    margin-top: 4px;
}

/* Privacy policy link */
.ara-privacy-link {
    grid-column: 1 / -1;
    margin-top: 4px;
}

.ara-privacy-link a {
    color: #4C8590;
    text-decoration: underline;
    font-size: 14px;
}

/* Panel actions */
.ara-booking-panel-actions {
    display: flex;
    gap: 12px;
    margin-top: 32px;
}

/* Buttons */
.ara-booking-btn {
    padding: 14px 32px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.ara-booking-submit,
.ara-booking-next {
    background: #122E33;
    color: #fff;
}

.ara-booking-submit:hover,
.ara-booking-next:hover {
    background: #0d2226;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(18, 46, 51, 0.35);
}

.ara-booking-back {
    background: #f5f5f5;
    color: #666;
    border: 1px solid #e0e0e0;
}

.ara-booking-back:hover {
    background: #e8e8e8;
}

/*
 * Disabled state. The booking form is often embedded via Elementor, whose
 * per-page CSS paints these buttons with the theme primary colour at a high
 * specificity (e.g. .elementor-NNN .elementor-element-xxx .ara-booking-btn.ara-booking-next,
 * specificity 0,5,0). To make the disabled state read as unmistakably inert we
 * must out-specify / override that: a compound .ara-booking-form-scoped selector
 * plus !important on the visual cues. opacity is kept as a belt-and-braces dim
 * so the button still looks disabled even if a future override beats the colour.
 */
.ara-booking-btn:disabled {
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.ara-booking-form .ara-booking-btn:disabled,
.ara-booking-form button.ara-booking-btn.ara-booking-next:disabled,
.ara-booking-form button.ara-booking-btn.ara-booking-submit:disabled {
    background: #cccccc !important;
    background-image: none !important;
    color: #6b6b6b !important;
    opacity: 0.6 !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
    transform: none !important;
}

/* Spinner */
.ara-booking-spinner {
    text-align: center;
    padding: 20px;
}

.ara-booking-spinner::after {
    content: '';
    display: inline-block;
    width: 28px;
    height: 28px;
    border: 3px solid #e0e0e0;
    border-top-color: #4C8590;
    border-radius: 50%;
    animation: ara-spin 0.8s linear infinite;
}

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

/* Messages */
.ara-booking-message {
    padding: 24px;
    border-radius: 10px;
    text-align: center;
    font-size: 16px;
}

/* Stack the confirmation text and the "Make another booking" CTA neatly. */
.ara-booking-message-text {
    margin: 0 0 20px;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
}

/*
 * "Make another booking" CTA. Styled standalone (NOT sharing .ara-booking-submit)
 * because that class collides with the submit click-handler + the submit-button
 * selector, which broke the second booking. Give it its own full button styling.
 */
.ara-make-another {
    display: inline-block;
    margin: 0 auto;
    padding: 12px 28px;
    background: #122E33;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.ara-make-another:hover {
    background: #0d2226;
}

.ara-booking-message.success {
    background: #d4edda;
    color: #155724;
}

.ara-booking-message.error {
    background: #f8d7da;
    color: #721c24;
}

/* Notice */
.ara-booking-notice {
    padding: 16px;
    background: #fff3cd;
    color: #856404;
    border-radius: 6px;
    text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
    .ara-booking-form {
        padding: 24px 20px;
    }

    .ara-booking-calendar-wrap {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .ara-booking-slots {
        grid-template-columns: repeat(3, 1fr);
    }

    .ara-booking-fields {
        grid-template-columns: 1fr;
    }

    .ara-booking-steps {
        gap: 16px;
    }

    .ara-booking-step {
        font-size: 13px;
    }

    .ara-step-num {
        width: 26px;
        height: 26px;
        font-size: 12px;
    }

    .ara-booking-type-list {
        grid-template-columns: 1fr;
    }

    .ara-on-behalf-fields {
        grid-template-columns: 1fr;
    }

    .ara-booker-section .ara-booking-fields {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .ara-booking-slots {
        grid-template-columns: repeat(2, 1fr);
    }
}
