/**
 * MaxBooker Booking Widget Styles
 *
 * Scoped under .maxbooker-widget to avoid conflicts with any WordPress theme.
 * Follows the SSA-inspired multi-step booking flow design.
 *
 * @package MaxBooker
 * @since   1.0.0
 */

/* =========================================================================
   Widget Container
   ========================================================================= */

.maxbooker-widget {
        font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
        font-size: 15px;
        color: #1a1a2e;
        line-height: 1.5;
        max-width: 680px;
        margin: 0 auto;
        position: relative;
        padding: 16px 0;
}

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

/* =========================================================================
   Step Indicator
   ========================================================================= */

.mb-steps {
        display: flex;
        align-items: center;
        justify-content: center;
        margin-bottom: 32px;
        padding: 0 12px;
}

.mb-step {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 6px;
        min-width: 56px;
}

.mb-step-number {
        width: 32px;
        height: 32px;
        border-radius: 50%;
        background: #e2e8f0;
        color: #94a3b8;
        font-weight: 700;
        font-size: 13px;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: background 0.2s, color 0.2s;
}

.mb-step.active .mb-step-number,
.mb-step.completed .mb-step-number {
        background: #4f8ef7;
        color: #fff;
}

.mb-step.completed .mb-step-number::after {
        content: '✓';
}

.mb-step.completed .mb-step-number {
        font-size: 0; /* Hide number when showing checkmark */
}

.mb-step.completed .mb-step-number::after {
        font-size: 14px;
}

.mb-step-label {
        font-size: 11px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        color: #94a3b8;
        transition: color 0.2s;
}

.mb-step.active .mb-step-label {
        color: #4f8ef7;
}

.mb-step.completed .mb-step-label {
        color: #64748b;
}

.mb-step-connector {
        flex: 1;
        height: 2px;
        background: #e2e8f0;
        margin-bottom: 18px;
        transition: background 0.2s;
        max-width: 80px;
}

.mb-step-connector.active {
        background: #4f8ef7;
}

/* =========================================================================
   Section
   ========================================================================= */

.mb-section {
        animation: mbFadeIn 0.2s ease;
}

@keyframes mbFadeIn {
        from { opacity: 0; transform: translateY(6px); }
        to   { opacity: 1; transform: translateY(0); }
}

.mb-section-title {
        font-size: 20px;
        font-weight: 700;
        color: #1a1a2e;
        margin: 0 0 20px;
}

.mb-section-header {
        display: flex;
        align-items: center;
        gap: 14px;
        margin-bottom: 20px;
}

.mb-section-header .mb-section-title {
        margin: 0;
}

/* =========================================================================
   Back Button
   ========================================================================= */

.mb-back-btn {
        background: none;
        border: 1px solid #ced4da;
        border-radius: 6px;
        padding: 7px 14px;
        font-size: 13px;
        font-weight: 500;
        color: #64748b;
        cursor: pointer;
        transition: all 0.15s;
        white-space: nowrap;
        flex-shrink: 0;
}

.mb-back-btn:hover {
        border-color: #94a3b8;
        color: #1a1a2e;
        background: #f8fafc;
}

/* =========================================================================
   Appointment Type Cards
   ========================================================================= */

.mb-type-cards {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 12px;
}

.mb-type-card {
        border: 2px solid #e2e8f0;
        border-radius: 10px;
        padding: 18px 16px;
        cursor: pointer;
        transition: all 0.15s;
        background: #fff;
        text-align: left;
}

.mb-type-card:hover {
        border-color: #4f8ef7;
        background: #f0f7ff;
}

.mb-type-card.selected {
        border-color: #4f8ef7;
        background: #ebf3ff;
}

.mb-type-card-color {
        width: 12px;
        height: 12px;
        border-radius: 50%;
        margin-bottom: 10px;
}

.mb-type-card-name {
        font-weight: 700;
        font-size: 14px;
        color: #1a1a2e;
        margin-bottom: 4px;
}

.mb-type-card-duration {
        font-size: 12px;
        color: #64748b;
}

.mb-type-card-desc {
        font-size: 12px;
        color: #64748b;
        margin-top: 6px;
        line-height: 1.4;
}

/* =========================================================================
   Calendar Navigation
   ========================================================================= */

.mb-calendar-nav {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 10px;
}

.mb-cal-nav-left,
.mb-cal-nav-right {
        display: flex;
        align-items: center;
        gap: 3px;
}

.mb-cal-month-label {
        font-size: 15px;
        font-weight: 700;
        color: #1a1a2e;
        text-align: center;
        flex: 1;
}

.mb-cal-prev,
.mb-cal-next {
        background: none;
        border: 1px solid #e2e8f0;
        border-radius: 6px;
        width: 34px;
        height: 34px;
        font-size: 22px;
        line-height: 1;
        color: #64748b;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.15s;
        padding: 0;
}

.mb-cal-prev-month,
.mb-cal-next-month {
        background: none;
        border: 1px solid #e2e8f0;
        border-radius: 6px;
        width: 28px;
        height: 34px;
        font-size: 15px;
        line-height: 1;
        color: #94a3b8;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.15s;
        padding: 0;
}

.mb-cal-prev:hover,
.mb-cal-next:hover {
        background: #f0f7ff;
        border-color: #4f8ef7;
        color: #4f8ef7;
}

.mb-cal-prev-month:hover,
.mb-cal-next-month:hover {
        background: #f0f7ff;
        border-color: #4f8ef7;
        color: #4f8ef7;
}

.mb-cal-prev:disabled,
.mb-cal-next:disabled {
        opacity: 0.3;
        cursor: not-allowed;
}

.mb-cal-prev-month:disabled,
.mb-cal-next-month:disabled {
        opacity: 0.3;
        cursor: not-allowed;
}

/* =========================================================================
   Calendar Strip — Day of week header
   ========================================================================= */

.mb-calendar-dow {
        display: grid;
        grid-template-columns: repeat(7, 1fr);
        gap: 4px;
        margin-bottom: 4px;
}

.mb-calendar-dow span {
        text-align: center;
        font-size: 11px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        color: #94a3b8;
        padding: 4px 0;
}

/* =========================================================================
   Calendar Strip — Date Cells
   ========================================================================= */

.mb-calendar-strip {
        display: grid;
        grid-template-columns: repeat(7, 1fr);
        gap: 4px;
        margin-bottom: 20px;
}

.mb-cal-day {
        border: 2px solid transparent;
        border-radius: 8px;
        padding: 8px 4px;
        text-align: center;
        cursor: pointer;
        transition: all 0.15s;
        background: #f8fafc;
        position: relative;
}

.mb-cal-day:hover:not(.unavailable):not(.past) {
        border-color: #4f8ef7;
        background: #f0f7ff;
}

.mb-cal-day.selected {
        border-color: #4f8ef7;
        background: #4f8ef7;
        color: #fff;
}

.mb-cal-day.selected .mb-day-num,
.mb-cal-day.selected .mb-day-name {
        color: #fff;
}

.mb-cal-day.unavailable,
.mb-cal-day.past {
        opacity: 0.35;
        cursor: not-allowed;
        background: transparent;
}

.mb-cal-day.today {
        border-color: #e2e8f0;
}

.mb-cal-day.today:not(.selected) .mb-day-num {
        color: #4f8ef7;
        font-weight: 800;
}

.mb-day-name {
        font-size: 10px;
        text-transform: uppercase;
        letter-spacing: 0.4px;
        color: #94a3b8;
        margin-bottom: 4px;
        font-weight: 600;
}

.mb-day-num {
        font-size: 17px;
        font-weight: 700;
        color: #1a1a2e;
        line-height: 1;
}

/* Month boundary badge — appears on the 1st of each new month */
.mb-month-badge {
        font-size: 9px;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: 0.4px;
        color: #fff;
        background: #4f8ef7;
        border-radius: 3px;
        padding: 1px 4px;
        margin-bottom: 3px;
        line-height: 1.4;
        display: inline-block;
}

.mb-cal-day.unavailable .mb-month-badge,
.mb-cal-day.past .mb-month-badge {
        background: #94a3b8;
}

.mb-cal-day.selected .mb-month-badge {
        background: rgba(255,255,255,0.35);
        color: #fff;
}

.mb-cal-day.has-slots::after {
        content: '';
        display: block;
        width: 4px;
        height: 4px;
        background: #4f8ef7;
        border-radius: 50%;
        margin: 4px auto 0;
}

.mb-cal-day.selected.has-slots::after {
        background: rgba(255,255,255,0.7);
}

.mb-calendar-loading {
        display: flex;
        align-items: center;
        gap: 10px;
        color: #64748b;
        font-size: 14px;
        padding: 16px 0;
}

/* =========================================================================
   Time Slots
   ========================================================================= */

.mb-selected-date-label {
        font-size: 14px;
        font-weight: 600;
        color: #4f8ef7;
        margin: 0 0 20px;
        background: #ebf3ff;
        padding: 8px 14px;
        border-radius: 6px;
        display: inline-block;
}

.mb-slots-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 24px;
}

@media (max-width: 480px) {
        .mb-slots-grid {
                grid-template-columns: 1fr;
        }
}

.mb-slots-period-label {
        font-size: 12px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.6px;
        color: #64748b;
        margin: 0 0 12px;
}

.mb-slots-list {
        display: flex;
        flex-direction: column;
        gap: 8px;
}

.mb-slot-btn {
        padding: 12px 16px;
        border: 2px solid #e2e8f0;
        border-radius: 8px;
        background: #fff;
        font-size: 14px;
        font-weight: 600;
        color: #374151;
        cursor: pointer;
        text-align: left;
        transition: all 0.15s;
        width: 100%;
}

.mb-slot-btn:hover {
        border-color: #4f8ef7;
        background: #f0f7ff;
        color: #1d4ed8;
}

.mb-slot-btn.selected {
        border-color: #4f8ef7;
        background: #4f8ef7;
        color: #fff;
}

.mb-slot-empty {
        font-size: 13px;
        color: #94a3b8;
        padding: 8px 0;
        font-style: italic;
}

.mb-slots-loading,
.mb-no-slots-msg {
        text-align: center;
        padding: 32px;
        color: #64748b;
}

.mb-no-slots-msg p {
        margin: 0;
}

/* =========================================================================
   Booking Summary Bar (Step 3)
   ========================================================================= */

.mb-booking-summary-bar {
        display: flex;
        gap: 16px;
        margin-bottom: 24px;
        padding: 14px 16px;
        background: #f8fafc;
        border: 1px solid #e2e8f0;
        border-radius: 8px;
        flex-wrap: wrap;
}

.mb-summary-item {
        font-size: 13px;
        color: #374151;
        font-weight: 600;
}

.mb-summary-item::before {
        margin-right: 6px;
}

.mb-summary-type::before  { content: '📋'; }
.mb-summary-datetime::before { content: '🕐'; }

/* =========================================================================
   Booking Form
   ========================================================================= */

/* Visually hidden but fully accessible to screen readers */
.mb-sr-only {
        position: absolute !important;
        width: 1px !important;
        height: 1px !important;
        padding: 0 !important;
        margin: -1px !important;
        overflow: hidden !important;
        clip: rect(0, 0, 0, 0) !important;
        white-space: nowrap !important;
        border: 0 !important;
}

.mb-booking-form .mb-form-field {
        margin-bottom: 18px;
}

.mb-booking-form label {
        display: block;
        font-size: 13px;
        font-weight: 600;
        color: #374151;
        margin-bottom: 6px;
}

/* =========================================================================
   Grouped field strip — Name / Email / Phone (SSA-style)
   ========================================================================= */

/* Outer group: no border of its own — individual rows have their own borders (SSA style).
   Keep overflow:visible so the phone country dropdown can escape the container. */
.mb-field-group {
        border: none;
        border-radius: 0;
        overflow: visible;
        margin-bottom: 18px;
        background: transparent;
        padding: 0;
}

/* Each field row is a self-contained gray box with its own visible border and
   a small white gap below — exactly matching the SSA grouped-field look. */
.mb-field-group .mb-group-field {
        margin-bottom: 5px !important;
        border: 1px solid #d0d5db !important;
        background: #f4f6f9;
        border-radius: 6px;
}

.mb-field-group .mb-group-field:last-child {
        margin-bottom: 0 !important;
}

/* Strip individual borders from float inputs inside the group.
   Use .maxbooker-widget prefix for higher specificity against theme !important rules. */
.maxbooker-widget .mb-field-group .mb-float-input {
        border: none !important;
        border-radius: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
        outline: none !important;
}

.maxbooker-widget .mb-field-group .mb-float-input:focus {
        box-shadow: none !important;
        border: none !important;
        outline: none !important;
}

/* Error state inside group: red left border on the row instead */
.mb-field-group .mb-group-field:has(.has-error) {
        border-left: 3px solid #ef4444;
        background: #fff5f5;
}

/* Strip phone-wrap's own border when inside the group phone stack */
.mb-field-group .mb-phone-stack .mb-phone-wrap {
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        background: transparent !important;
}

.mb-field-group .mb-phone-stack .mb-phone-wrap:focus-within {
        box-shadow: none !important;
        border-color: transparent !important;
}

.mb-field-group .mb-phone-stack .mb-phone-wrap .mb-country-btn {
        border-right-color: #e2e8f0 !important;
}

.mb-required {
        color: #ef4444;
        margin-left: 2px;
}

.mb-optional {
        font-weight: 400;
        color: #94a3b8;
        font-size: 12px;
}

.mb-booking-form input,
.mb-booking-form textarea {
        width: 100%;
        padding: 11px 14px;
        border: 1.5px solid #e2e8f0;
        border-radius: 8px;
        font-size: 15px;
        color: #1a1a2e;
        background: #f8fafc;
        transition: border-color 0.15s, box-shadow 0.15s;
        font-family: inherit;
        line-height: 1.5;
}

.mb-booking-form input:focus,
.mb-booking-form textarea:focus {
        border-color: #4f8ef7;
        outline: none;
        box-shadow: 0 0 0 3px rgba(79, 142, 247, 0.15);
}

.mb-booking-form input.has-error,
.mb-booking-form textarea.has-error {
        border-color: #ef4444;
}

.mb-booking-form input.has-error:focus {
        box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

.mb-field-error {
        display: block;
        font-size: 12px;
        color: #ef4444;
        margin-top: 5px;
        min-height: 16px;
}

/* Inside the grouped field strip the error span must NOT add empty space below the
   input — collapse it until there is actually an error message to display. */
.mb-field-group .mb-field-error {
        min-height: 0 !important;
        margin-top: 0 !important;
        padding: 0 !important;
}

.mb-form-error {
        background: #fee2e2;
        color: #991b1b;
        padding: 12px 16px;
        border-radius: 8px;
        font-size: 14px;
        margin-bottom: 16px;
        border: 1px solid #fecaca;
}

/* =========================================================================
   Floating label fields — Name & Email
   The label sits inside the input at placeholder height, then floats to the
   top-left when the input is focused or has a value. Technique: input comes
   BEFORE the label in DOM so the CSS sibling selector (input ~ label) works.
   placeholder=" " (a single space) lets :placeholder-shown detect empty state.
   ========================================================================= */

.mb-float-field {
        position: relative !important;
        display: flex !important;
        align-items: stretch !important;
        min-height: 46px !important;
        box-sizing: border-box !important;
}

.mb-float-field .mb-field-icon {
        position: absolute !important;
        left: 13px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        color: #94a3b8;
        display: flex !important;
        align-items: center !important;
        pointer-events: none !important;
        z-index: 3 !important;
        line-height: 0 !important;
        transition: color 0.15s;
        margin: 0 !important;
        padding: 0 !important;
        width: auto !important;
        height: auto !important;
}

.mb-float-input {
        width: 100%;
        padding: 11px 14px 11px 40px !important;
        background: transparent !important;
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        font-size: 15px;
        color: #1a1a2e;
        font-family: inherit;
        line-height: 1.5;
        position: relative;
        z-index: 1;
        align-self: center;
}

.mb-float-input:focus {
        outline: none !important;
        box-shadow: none !important;
        border: none !important;
}

/* When label is floating (CSS or JS-driven), push the typed value down so it
   sits below the small floated label — same effect as MDC's label-floating state */
.maxbooker-widget .mb-float-input:focus,
.maxbooker-widget .mb-float-input:not(:placeholder-shown),
.maxbooker-widget .mb-float-filled .mb-float-input,
.maxbooker-widget .mb-float-focused .mb-float-input {
        padding-top: 17px !important;
        padding-bottom: 3px !important;
}

/* Label: absolute-positioned, vertically centered by default, floats to top */
.maxbooker-widget .mb-float-label {
        position: absolute !important;
        left: 40px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        font-size: 14px !important;
        font-weight: 500 !important;
        color: #94a3b8 !important;
        pointer-events: none !important;
        transition: top 0.18s ease, transform 0.18s ease, font-size 0.18s ease,
                        color 0.18s ease, font-weight 0.18s ease !important;
        z-index: 2 !important;
        white-space: nowrap !important;
        margin: 0 !important;
        padding: 0 !important;
        display: block !important;
        background: transparent !important;
        line-height: 1.4 !important;
}

/* Float up when input is focused or has content.
   Three parallel triggers so any one is enough:
   1. CSS :placeholder-shown trick (pure CSS, works on manual typing)
   2. .mb-float-filled class added by JS when input.value.length > 0 (catches autofill)
   3. .mb-float-focused class added by JS on focus (explicit focus state) */
.maxbooker-widget .mb-float-input:focus ~ .mb-float-label,
.maxbooker-widget .mb-float-input:not(:placeholder-shown) ~ .mb-float-label,
.maxbooker-widget .mb-float-filled .mb-float-label,
.maxbooker-widget .mb-float-focused .mb-float-label {
        top: 9px !important;
        transform: translateY(0) !important;
        font-size: 10px !important;
        font-weight: 700 !important;
        color: #6b7280 !important;
        letter-spacing: 0.03em !important;
        text-transform: uppercase !important;
}

/* Blue label when focused */
.maxbooker-widget .mb-float-input:focus ~ .mb-float-label,
.maxbooker-widget .mb-float-focused .mb-float-label {
        color: #4f8ef7 !important;
}

/* Required star */
.mb-float-label .mb-req {
        color: #ef4444;
        margin-left: 1px;
}

/* =========================================================================
   Phone field — SSA-style stacked layout
   Mini-label (icon + "Phone *") on top row; flag-dropdown + input below.
   ========================================================================= */

.mb-phone-stack {
        display: flex;
        flex-direction: column;
}

.mb-phone-mini-label {
        display: flex !important;
        align-items: center !important;
        gap: 5px !important;
        padding: 6px 14px 1px 13px !important;
        font-size: 10px !important;
        font-weight: 700 !important;
        color: #6b7280 !important;
        letter-spacing: 0.03em !important;
        text-transform: uppercase !important;
        line-height: 1 !important;
        margin: 0 !important;
}

.mb-phone-mini-label .mb-req {
        color: #ef4444;
}

.mb-phone-icon-sm {
        color: #94a3b8;
        line-height: 0;
        display: inline-flex;
        align-items: center;
}

.mb-phone-stack .mb-phone-wrap {
        border-top: none !important;
}

/* Standalone mb-input-wrap kept for backward compatibility if needed */
.mb-input-wrap {
        position: relative;
        display: block;
}

.mb-input-wrap .mb-field-icon {
        position: absolute;
        left: 13px;
        top: 50%;
        transform: translateY(-50%);
        color: #94a3b8;
        display: flex;
        align-items: center;
        pointer-events: none;
        z-index: 1;
        line-height: 0;
}

.mb-input-wrap input {
        padding-left: 40px !important;
}

/* =========================================================================
   Phone field — icon + country selector + number input
   ========================================================================= */

.mb-phone-wrap {
        display: flex !important;
        align-items: stretch !important;
        border: 1.5px solid #e2e8f0;
        border-radius: 8px;
        background: #f8fafc;
        overflow: visible;
        position: relative;
}

.mb-phone-wrap:focus-within {
        border-color: #4f8ef7;
        box-shadow: 0 0 0 3px rgba(79, 142, 247, 0.15);
}

.mb-phone-wrap .mb-field-icon {
        position: static !important;
        transform: none !important;
        top: auto !important;
        left: auto !important;
        padding: 0 6px 0 13px;
        align-self: center;
        flex-shrink: 0;
        color: #94a3b8;
        display: flex;
        align-items: center;
        pointer-events: none;
        line-height: 0;
}

.mb-country-btn {
        display: flex !important;
        align-items: center !important;
        gap: 4px;
        padding: 0 8px 0 2px !important;
        background: transparent !important;
        border: none !important;
        border-right: 1.5px solid #e2e8f0 !important;
        border-radius: 0 !important;
        cursor: pointer;
        color: #374151;
        font-size: 14px;
        white-space: nowrap;
        flex-shrink: 0;
        line-height: 1;
        box-shadow: none !important;
        outline: none;
        height: auto;
        min-height: 0;
        width: auto !important;
        font-family: inherit;
}

.mb-country-btn:hover {
        background: rgba(0,0,0,0.04) !important;
}

.mb-country-flag {
        font-size: 18px;
        line-height: 1;
}

.mb-country-code {
        font-size: 13px;
        font-weight: 600;
        color: #374151;
        letter-spacing: 0.01em;
}

.mb-caret {
        color: #94a3b8;
        flex-shrink: 0;
        margin-left: 1px;
}

/* Country dropdown list */
.mb-country-list {
        display: none;
        position: absolute;
        top: calc(100% + 4px);
        left: 0;
        z-index: 9999;
        background: #fff;
        border: 1.5px solid #e2e8f0;
        border-radius: 8px;
        box-shadow: 0 8px 24px rgba(0,0,0,0.12);
        list-style: none;
        margin: 0;
        padding: 4px 0;
        min-width: 220px;
        max-height: 240px;
        overflow-y: auto;
}

.mb-country-list.mb-open {
        display: block;
}

.mb-country-list li {
        padding: 9px 14px;
        font-size: 14px;
        color: #374151;
        cursor: pointer;
        white-space: nowrap;
        display: block !important;
        margin: 0 !important;
        border: none !important;
        background: none !important;
}

.mb-country-list li:hover,
.mb-country-list li.mb-selected {
        background: #f0f6ff !important;
        color: #1a4ebd;
}

/* Phone number input — inside the flex phone wrap */
.maxbooker-widget .mb-phone-input {
        border: none !important;
        border-radius: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
        flex: 1 !important;
        min-width: 0 !important;
        padding: 11px 14px !important;
        outline: none !important;
}

.maxbooker-widget .mb-phone-wrap input.has-error {
        background: transparent !important;
}

.maxbooker-widget .mb-phone-wrap.has-error-wrap {
        border-color: #ef4444 !important;
}

/* =========================================================================
   Submit button
   ========================================================================= */

.mb-submit-btn {
        width: 100%;
        padding: 15px 24px;
        background: #4f8ef7;
        color: #fff;
        border: none;
        border-radius: 8px;
        font-size: 16px;
        font-weight: 700;
        cursor: pointer;
        transition: background 0.15s, transform 0.1s;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        font-family: inherit;
        line-height: 1;
        margin-top: 8px;
}

.mb-submit-btn:hover {
        background: #3b7de8;
}

.mb-submit-btn:active {
        transform: scale(0.99);
}

.mb-submit-btn:disabled {
        opacity: 0.7;
        cursor: not-allowed;
}

/* =========================================================================
   Confirmation Screen (Step 4)
   ========================================================================= */

.mb-confirmation {
        text-align: center;
        padding: 12px 0;
}

.mb-confirmation-icon {
        width: 64px;
        height: 64px;
        border-radius: 50%;
        background: #d1fae5;
        color: #059669;
        font-size: 28px;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0 auto 20px;
        animation: mbBounceIn 0.4s ease;
}

@keyframes mbBounceIn {
        0%   { transform: scale(0.5); opacity: 0; }
        60%  { transform: scale(1.15); }
        100% { transform: scale(1); opacity: 1; }
}

.mb-confirmation-title {
        font-size: 24px;
        font-weight: 800;
        color: #1a1a2e;
        margin: 0 0 8px;
}

.mb-confirmation-msg {
        color: #64748b;
        font-size: 15px;
        margin: 0 0 4px;
}

.mb-confirmation-email {
        font-weight: 700;
        color: #1a1a2e;
        margin: 0 0 28px;
}

.mb-confirmation-card {
        background: #f8fafc;
        border: 1px solid #e2e8f0;
        border-radius: 10px;
        padding: 20px 24px;
        margin: 0 0 24px;
        text-align: left;
}

.mb-conf-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 9px 0;
        border-bottom: 1px solid #e2e8f0;
        font-size: 14px;
}

.mb-conf-row:last-child {
        border-bottom: none;
}

.mb-conf-label {
        font-size: 11px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        color: #94a3b8;
}

.mb-conf-value {
        font-weight: 600;
        color: #1a1a2e;
        text-align: right;
}

.mb-confirmation-actions {
        display: flex;
        gap: 12px;
        justify-content: center;
        flex-wrap: wrap;
        margin-bottom: 20px;
}

.mb-btn-primary,
.mb-btn-secondary {
        display: inline-block;
        padding: 12px 22px;
        border-radius: 8px;
        font-size: 14px;
        font-weight: 700;
        text-decoration: none;
        transition: all 0.15s;
        cursor: pointer;
        border: 2px solid transparent;
        font-family: inherit;
        line-height: 1;
}

.mb-btn-primary {
        background: #4f8ef7;
        color: #fff;
        border-color: #4f8ef7;
}

.mb-btn-primary:hover {
        background: #3b7de8;
        color: #fff;
        border-color: #3b7de8;
}

.mb-btn-secondary {
        background: #fff;
        color: #374151;
        border-color: #ced4da;
}

.mb-btn-secondary:hover {
        background: #f8fafc;
        border-color: #94a3b8;
        color: #1a1a2e;
}

.mb-book-another {
        margin: 0;
}

.mb-book-another-link {
        color: #4f8ef7;
        font-size: 14px;
        font-weight: 600;
        text-decoration: none;
}

.mb-book-another-link:hover {
        text-decoration: underline;
}

/* =========================================================================
   Spinner / Loading States
   ========================================================================= */

.mb-spinner {
        display: inline-block;
        width: 24px;
        height: 24px;
        border: 3px solid rgba(79, 142, 247, 0.2);
        border-top-color: #4f8ef7;
        border-radius: 50%;
        animation: mbSpin 0.7s linear infinite;
        flex-shrink: 0;
}

.mb-spinner-small {
        width: 16px;
        height: 16px;
        border-width: 2px;
}

@keyframes mbSpin {
        to { transform: rotate(360deg); }
}

.mb-global-loading {
        position: absolute;
        inset: 0;
        background: rgba(255,255,255,0.8);
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 8px;
        z-index: 10;
}

/* =========================================================================
   Timezone Bar — persistent selector on Steps 1 & 2 (v1.2.0)
   ========================================================================= */

/* Outer bar — sits between step indicator and calendar */
.mb-tz-bar {
        margin: 0 0 22px;
}

.mb-tz-bar-inner {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        background: #f8faff;
        border: 1px solid #dde6ff;
        border-radius: 10px;
        padding: 10px 14px 10px 16px;
}

/* Left label: globe + text */
.mb-tz-bar-label {
        display: flex;
        align-items: center;
        gap: 7px;
        font-size: 13px;
        color: #64748b;
        white-space: nowrap;
        flex-shrink: 1;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
}

.mb-tz-globe-icon {
        font-size: 15px;
        line-height: 1;
        flex-shrink: 0;
}

/* Right: selector button + dropdown wrapper */
.mb-tz-selector-wrap {
        position: relative;
        flex-shrink: 0;
}

/* The button itself — styled like a pill-chip */
.mb-tz-selector-btn {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        background: #ffffff;
        border: 1.5px solid #c7d7fc;
        border-radius: 8px;
        padding: 6px 10px 6px 12px;
        font-size: 13px;
        font-family: inherit;
        font-weight: 600;
        color: #3b5bdb;
        cursor: pointer;
        white-space: nowrap;
        transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
        line-height: 1;
}

.mb-tz-selector-btn:hover {
        border-color: #3b5bdb;
        background: #f0f4ff;
        box-shadow: 0 0 0 3px rgba(59, 91, 219, 0.12);
}

.mb-tz-selector-btn[aria-expanded="true"] {
        border-color: #3b5bdb;
        background: #f0f4ff;
        box-shadow: 0 0 0 3px rgba(59, 91, 219, 0.12);
}

/* Timezone name — truncates if too long */
.mb-tz-selector-name {
        max-width: 180px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
}

/* Abbreviation badge (e.g. "CDT") */
.mb-tz-selector-abbr {
        display: inline-block;
        background: #e8edff;
        border-radius: 4px;
        padding: 2px 6px;
        font-size: 11px;
        font-weight: 700;
        color: #3b5bdb;
        letter-spacing: 0.3px;
        flex-shrink: 0;
}

/* Chevron icon */
.mb-tz-chevron {
        width: 14px;
        height: 14px;
        color: #94a3b8;
        flex-shrink: 0;
        transition: transform 0.18s ease;
}

.mb-tz-selector-btn[aria-expanded="true"] .mb-tz-chevron {
        transform: rotate(180deg);
        color: #3b5bdb;
}

/* ---- Dropdown panel ---- */
.mb-tz-dropdown {
        position: absolute;
        top: calc(100% + 6px);
        right: 0;
        z-index: 300;
        background: #ffffff;
        border: 1px solid #e2e8f0;
        border-radius: 10px;
        box-shadow: 0 12px 36px rgba(0, 0, 0, 0.15), 0 2px 8px rgba(0, 0, 0, 0.06);
        width: 310px;
        max-width: calc(100vw - 24px);
        overflow: hidden;
        animation: mbTzDropIn 0.15s ease;
}

@keyframes mbTzDropIn {
        from { opacity: 0; transform: translateY(-6px); }
        to   { opacity: 1; transform: translateY(0); }
}

.mb-tz-dropdown-header {
        padding: 11px 16px 9px;
        font-size: 10.5px;
        font-weight: 700;
        color: #94a3b8;
        text-transform: uppercase;
        letter-spacing: 0.9px;
        border-bottom: 1px solid #f1f5f9;
}

/* Search input inside the dropdown */
.mb-tz-search {
        display: block;
        width: 100%;
        padding: 10px 16px;
        border: none;
        border-bottom: 1px solid #f1f5f9;
        font-size: 13.5px;
        font-family: inherit;
        color: #1a1a2e;
        background: #f8fafc;
        outline: none;
}

.mb-tz-search:focus {
        background: #ffffff;
        border-bottom-color: #c7d7fc;
}

.mb-tz-search::placeholder {
        color: #94a3b8;
}

/* Scrollable option list — force bullet reset against WordPress theme overrides */
.mb-tz-list {
        list-style: none !important;
        margin: 0 !important;
        padding: 4px 0 !important;
        max-height: 230px;
        overflow-y: auto;
        overscroll-behavior: contain;
}

/* Belt-AND-suspenders: target li directly so theme rules can't bleed through.
   Note: do NOT zero padding-left here — that's set per-element below. */
.mb-tz-list li,
.mb-tz-option,
.mb-tz-noresult {
        list-style: none !important;
        list-style-type: none !important;
        margin-left: 0 !important;
        background-image: none !important;
}

/* Kill any ::before bullet pseudo-elements themes inject */
.mb-tz-list li::before,
.mb-tz-list li::after {
        content: none !important;
        display: none !important;
}

.mb-tz-option {
        padding: 9px 16px !important;
        font-size: 13px;
        color: #374151;
        cursor: pointer;
        transition: background 0.1s;
        line-height: 1.4;
}

.mb-tz-option:hover {
        background: #f0f4ff;
        color: #1e3a8a;
}

.mb-tz-noresult {
        padding: 16px !important;
        font-size: 13px;
        color: #94a3b8;
        text-align: center;
}

/* Mobile: stack label above selector */
@media (max-width: 480px) {
        .mb-tz-bar-inner {
                flex-direction: column;
                align-items: flex-start;
                gap: 8px;
        }

        .mb-tz-selector-wrap {
                align-self: stretch;
        }

        .mb-tz-selector-btn {
                width: 100%;
                justify-content: space-between;
        }

        .mb-tz-selector-name {
                max-width: none;
                flex: 1;
        }

        .mb-tz-dropdown {
                right: auto;
                left: 0;
                width: 100%;
        }
}

/* =========================================================================
   SMS Consent Checkbox Block
   ========================================================================= */

.mb-sms-consent-block {
        margin-bottom: 18px;
}

/*
 * Use a plain <div> as the flex row — themes don't apply form styles to divs.
 * Checkbox and label are siblings inside .mb-consent-row, not parent/child.
 * This completely sidesteps WordPress theme rules like input { width:100%; display:block }.
 */
.maxbooker-widget .mb-consent-row {
        display: flex !important;
        flex-direction: row !important;
        align-items: flex-start !important;
        flex-wrap: nowrap !important;
        text-align: left !important;
        gap: 10px;
}

.maxbooker-widget .mb-consent-row input[type="checkbox"] {
        display: inline-block !important;
        width: 15px !important;
        height: 15px !important;
        min-width: 15px !important;
        max-width: 15px !important;
        flex-shrink: 0 !important;
        margin: 3px 0 0 0 !important;
        padding: 0 !important;
        border: 1px solid #94a3b8 !important;
        border-radius: 3px !important;
        background: #fff !important;
        box-shadow: none !important;
        float: none !important;
        accent-color: #4f8ef7;
        cursor: pointer;
}

.maxbooker-widget .mb-consent-row input[type="checkbox"]:focus {
        outline: 2px solid #4f8ef7 !important;
        outline-offset: 2px;
}

.maxbooker-widget .mb-consent-row .mb-consent-text {
        font-size: 13px;
        color: #64748b;
        line-height: 1.5;
        cursor: pointer;
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
        background: none !important;
        box-shadow: none !important;
        display: block !important;
        width: auto !important;
        font-weight: 400;
}

/* =========================================================================
   Responsive Adjustments
   ========================================================================= */

@media (max-width: 540px) {
        .mb-steps {
                padding: 0;
        }

        .mb-step-label {
                display: none;
        }

        .mb-step-connector {
                max-width: 40px;
        }

        .mb-confirmation-actions {
                flex-direction: column;
                align-items: center;
        }

        .mb-btn-primary,
        .mb-btn-secondary {
                width: 100%;
                text-align: center;
        }

        .mb-booking-summary-bar {
                flex-direction: column;
                gap: 6px;
        }
}
