.tfac-booking,
.tfac-booking * {
    box-sizing: border-box;
}

/* The native hidden attribute must win over our display rules below
   (display: inline-flex would otherwise force hidden buttons to show). */
.tfac-booking [hidden] {
    display: none !important;
}

.tfac-booking {
    --tfac-primary: #E97CAC;
    --tfac-primary-dark: #c85d8e;
    --tfac-text: #2f2328;
    --tfac-muted: #756571;
    --tfac-soft: #fff7fb;
    --tfac-surface: #ffffff;
    --tfac-border: #efe4ea;
    --tfac-border-strong: #e8bdd1;
    --tfac-red: #b42335;
    --tfac-sidebar: #ee7eaa;
    --tfac-sidebar-soft: #f08fb5;
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    color: var(--tfac-text);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 15px;
    line-height: 1.45;
}

/* ---------- Wizard shell ---------- */
.tfac-wizard {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    border: 1px solid var(--tfac-border);
    border-radius: 16px;
    background: var(--tfac-surface);
    overflow: hidden;
    box-shadow: 0 18px 40px -28px rgba(95, 40, 65, .45);
    min-height: 560px;
}

/* ---------- Sidebar ---------- */
.tfac-wizard__sidebar {
    display: flex;
    flex-direction: column;
    padding: 18px 16px;
    background: var(--tfac-sidebar);
    color: #fff;
}

.tfac-steps {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tfac-step {
    display: flex;
    align-items: center;
    gap: 11px;
    width: 100%;
    padding: 12px 14px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: rgba(255, 255, 255, .85);
    cursor: pointer;
    font: inherit;
    text-align: left;
    transition: background .15s ease, color .15s ease;
}

.tfac-step:hover:not(.is-active):not(:disabled) {
    background: var(--tfac-sidebar-soft);
    color: #fff;
}

.tfac-step.is-active {
    background: var(--tfac-sidebar-soft);
    color: #fff;
}

.tfac-step:disabled,
.tfac-step.is-locked {
    opacity: .5;
    cursor: not-allowed;
}

.tfac-step.is-locked:hover {
    background: transparent;
    color: rgba(255, 255, 255, .85);
}

.tfac-step__icon {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    font-size: 15px;
    line-height: 1;
}

.tfac-step__text {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.tfac-step__num {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    opacity: .8;
}

.tfac-step__label {
    font-weight: 600;
}

.tfac-step__dot {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, .6);
    border-radius: 999px;
    background: transparent;
}

.tfac-step.is-complete .tfac-step__dot {
    border-color: #fff;
    background: #fff
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23ee7eaa'%3E%3Cpath d='M6.5 11.2 3.3 8l1.1-1.1 2.1 2.1 4.9-4.9L12.6 5.2z'/%3E%3C/svg%3E")
        center / 14px no-repeat;
}

.tfac-wizard__sidebar-foot {
    margin-top: auto;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, .25);
}

.tfac-wizard__brand {
    display: block;
    font-size: 12px;
    color: rgba(255, 255, 255, .85);
    text-align: center;
}

/* ---------- Main panels ---------- */
.tfac-wizard__main {
    display: flex;
    flex-direction: column;
    padding: 26px 28px 0;
    min-width: 0;
}

.tfac-panel {
    display: none;
    flex: 1 1 auto;
}

.tfac-panel.is-active {
    display: block;
    animation: tfac-fade .2s ease;
}

@keyframes tfac-fade {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: none; }
}

.tfac-panel__title {
    margin: 0 0 4px;
    font-size: 24px;
    line-height: 1.15;
    color: var(--tfac-text);
}

.tfac-panel__subtitle {
    margin: 0 0 20px;
    color: var(--tfac-muted);
    font-size: 14px;
}

.tfac-panel__hint {
    margin: 12px 0 0;
    color: var(--tfac-muted);
    font-size: 13px;
}

/* ---------- Participants / steppers ---------- */
.tfac-extra {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.tfac-extra__row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    border: 1px solid var(--tfac-border);
    border-radius: 12px;
    background: var(--tfac-surface);
}

.tfac-extra__name {
    flex: 1 1 auto;
    font-weight: 600;
    font-size: 16px;
}

.tfac-extra__price {
    flex: 0 0 auto;
    color: var(--tfac-primary);
    font-weight: 600;
}

.tfac-stepper {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--tfac-border);
    border-radius: 10px;
    overflow: hidden;
}

.tfac-stepper__btn {
    width: 36px;
    height: 36px;
    border: 0;
    background: var(--tfac-surface);
    color: var(--tfac-text);
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}

.tfac-stepper__btn:hover:not(:disabled) {
    background: #fde9f2;
    color: var(--tfac-primary-dark);
}

.tfac-stepper__btn:disabled {
    opacity: .4;
    cursor: not-allowed;
}

.tfac-stepper__value {
    min-width: 40px;
    text-align: center;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.tfac-summary {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-top: 20px;
    padding: 14px 18px;
    border: 1px solid var(--tfac-border);
    border-radius: 12px;
    background: var(--tfac-soft);
}

.tfac-summary span {
    color: var(--tfac-muted);
    font-weight: 600;
}

.tfac-summary strong {
    font-size: 22px;
    color: var(--tfac-primary-dark);
}

/* ---------- Your information ---------- */
.tfac-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    min-width: 0;
}

.tfac-field {
    min-width: 0;
}

.tfac-field--full {
    grid-column: 1 / -1;
}

.tfac-field label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 14px;
}

.tfac-field input,
.tfac-field textarea {
    width: 100%;
    min-height: 42px;
    padding: 9px 11px;
    border: 1px solid var(--tfac-border);
    border-radius: 10px;
    background: var(--tfac-surface);
    color: var(--tfac-text);
    font: inherit;
    font-size: 16px;
    outline: none;
}

.tfac-field input:focus,
.tfac-field textarea:focus {
    border-color: var(--tfac-primary);
    box-shadow: 0 0 0 3px rgba(233, 124, 172, .18);
}

.tfac-field input.is-invalid {
    border-color: var(--tfac-red);
    box-shadow: 0 0 0 3px rgba(180, 35, 53, .12);
}

.tfac-field textarea {
    resize: vertical;
}

.tfac-field__error {
    display: block;
    margin-top: 5px;
    min-height: 16px;
    color: var(--tfac-red);
    font-size: 12px;
    font-weight: 600;
}

/* ---------- Calendar ---------- */
.tfac-calendar-card,
.tfac-slots,
.tfac-payment-methods,
.tfac-recaptcha {
    margin-top: 18px;
    padding: 15px;
    border: 1px solid var(--tfac-border);
    border-radius: 14px;
    background: var(--tfac-surface);
    min-width: 0;
}

.tfac-calendar-card {
    margin-top: 0;
}

.tfac-calendar-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.tfac-calendar-title {
    font-size: 17px;
    text-align: center;
}

.tfac-calendar-prev,
.tfac-calendar-next {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    border: 1px solid var(--tfac-border-strong);
    border-radius: 999px;
    background: var(--tfac-surface);
    color: var(--tfac-primary-dark);
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
}

.tfac-calendar-prev:disabled,
.tfac-calendar-next:disabled {
    opacity: .4;
    cursor: not-allowed;
}

.tfac-calendar-weekdays,
.tfac-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
    min-width: 0;
}

.tfac-calendar-weekdays span {
    min-width: 0;
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--tfac-muted);
}

.tfac-calendar-grid {
    margin-top: 8px;
}

.tfac-calendar-loading {
    grid-column: 1 / -1;
    padding: 18px;
    text-align: center;
    color: var(--tfac-muted);
}

.tfac-calendar-day,
.tfac-calendar-empty {
    width: 100%;
    min-width: 0;
    min-height: 34px;
}

.tfac-calendar-day {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    padding: 0;
    border: 1px solid #f1e4eb;
    border-radius: 9px;
    background: #fbf8fa;
    color: #b29aa7;
    cursor: not-allowed;
    font: inherit;
    font-size: 14px;
}

.tfac-calendar-day.is-available {
    background: var(--tfac-surface);
    color: var(--tfac-text);
    cursor: pointer;
}

.tfac-calendar-day.is-available:hover,
.tfac-calendar-day.is-selected {
    border-color: var(--tfac-primary);
    background: var(--tfac-primary);
    color: #ffffff;
}

/* ---------- Slots ---------- */
.tfac-slots h3,
.tfac-payment-methods h3 {
    margin: 0 0 10px;
    font-size: 18px;
}

.tfac-slot-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.tfac-slot {
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: flex-start;
    min-width: 0;
    padding: 13px;
    border: 1px solid var(--tfac-border);
    border-radius: 12px;
    background: var(--tfac-surface);
    color: var(--tfac-text);
    cursor: pointer;
    text-align: left;
    font: inherit;
}

.tfac-slot strong {
    color: var(--tfac-text);
}

.tfac-slot span {
    color: var(--tfac-muted);
    font-size: 13px;
}

.tfac-slot:disabled {
    opacity: .52;
    cursor: not-allowed;
}

.tfac-slot.is-selected {
    border-color: var(--tfac-primary);
    background: #fde9f2;
}

/* Keep selected-slot text high-contrast (themes can otherwise turn button
   text white, making it vanish on the light pink background). */
.tfac-slot.is-selected,
.tfac-slot.is-selected strong {
    color: var(--tfac-primary-dark);
}

.tfac-slot.is-selected span {
    color: var(--tfac-muted);
}

/* ---------- Payment ---------- */
.tfac-payment-methods label {
    display: block;
    margin: 8px 0;
}

/* ---------- Summary (step 4) ---------- */
.tfac-order {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 15px;
    border: 1px solid var(--tfac-border);
    border-radius: 14px;
    background: var(--tfac-surface);
}

.tfac-order__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.tfac-order__label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--tfac-muted);
    font-weight: 600;
    font-size: 14px;
}

.tfac-order__label i {
    color: var(--tfac-primary);
    width: 16px;
    text-align: center;
}

.tfac-order__value {
    text-align: right;
    font-weight: 600;
}

.tfac-totals {
    margin-top: 14px;
    padding: 15px 18px;
    border: 1px solid var(--tfac-border);
    border-radius: 14px;
    background: var(--tfac-soft);
}

.tfac-totals__row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 5px 0;
    color: var(--tfac-text);
    font-size: 15px;
}

.tfac-totals__row > span:last-child,
.tfac-totals__row > strong:last-child {
    font-variant-numeric: tabular-nums;
}

.tfac-totals__row--subtotal {
    color: var(--tfac-muted);
}

.tfac-totals__row--discount {
    color: #1d7a32;
    font-weight: 600;
}

.tfac-totals__row--grand {
    margin-top: 6px;
    padding-top: 12px;
    border-top: 1px solid var(--tfac-border-strong);
    font-size: 18px;
}

.tfac-totals__row--grand strong {
    font-size: 22px;
    color: var(--tfac-primary-dark);
}

/* ---------- Coupon ---------- */
.tfac-coupon {
    margin-top: 18px;
    padding: 15px;
    border: 1px solid var(--tfac-border);
    border-radius: 14px;
    background: var(--tfac-surface);
}

.tfac-coupon__label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
}

.tfac-coupon__row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tfac-coupon-input {
    flex: 1 1 160px;
    min-width: 0;
    min-height: 42px;
    padding: 9px 11px;
    border: 1px solid var(--tfac-border);
    border-radius: 10px;
    background: var(--tfac-surface);
    color: var(--tfac-text);
    font: inherit;
    font-size: 16px;
    outline: none;
    letter-spacing: .04em;
}

.tfac-coupon-input:focus {
    border-color: var(--tfac-primary);
    box-shadow: 0 0 0 3px rgba(233, 124, 172, .18);
}

.tfac-coupon-input:disabled {
    background: #f6eef2;
    color: var(--tfac-muted);
}

.tfac-coupon-apply,
.tfac-coupon-remove {
    flex: 0 0 auto;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
}

.tfac-coupon-apply {
    border: 0;
    background: var(--tfac-primary);
    color: #fff;
}

.tfac-coupon-apply:hover:not(:disabled) {
    background: var(--tfac-primary-dark);
}

.tfac-coupon-apply:disabled {
    opacity: .65;
    cursor: wait;
}

.tfac-coupon-remove {
    border: 1px solid var(--tfac-border-strong);
    background: var(--tfac-surface);
    color: var(--tfac-primary-dark);
}

.tfac-coupon-remove:hover {
    background: #fde9f2;
}

.tfac-coupon__msg {
    min-height: 18px;
    margin: 10px 0 0;
    font-size: 13px;
    font-weight: 600;
}

.tfac-coupon__msg--error {
    color: var(--tfac-red);
}

.tfac-coupon__msg--success {
    color: #1d7a32;
}

.tfac-coupon__msg--info {
    color: var(--tfac-primary-dark);
}

/* ---------- Footer / nav ---------- */
.tfac-wizard__footer {
    margin-top: auto;
    padding: 18px 0 24px;
    border-top: 1px solid var(--tfac-border);
}

.tfac-form-response {
    min-height: 20px;
    margin-bottom: 12px;
    font-weight: 600;
    font-size: 14px;
}

.tfac-form-response--error {
    color: var(--tfac-red);
}

.tfac-form-response--info {
    color: var(--tfac-primary-dark);
}

.tfac-wizard__nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.tfac-back {
    padding: 11px 22px;
    border: 1px solid var(--tfac-border-strong);
    border-radius: 999px;
    background: var(--tfac-surface);
    color: var(--tfac-primary-dark);
    cursor: pointer;
    font: inherit;
    font-weight: 600;
}

.tfac-back:hover {
    background: #fde9f2;
}

.tfac-next,
.tfac-submit {
    display: inline-flex;
    justify-content: center;
    min-width: 140px;
    max-width: 100%;
    padding: 11px 22px;
    border: 0;
    border-radius: 999px;
    background: var(--tfac-primary);
    color: #ffffff;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
    white-space: nowrap;
}

.tfac-next:hover,
.tfac-next:focus,
.tfac-submit:hover,
.tfac-submit:focus {
    background: var(--tfac-primary-dark);
}

.tfac-submit:disabled,
.tfac-next:disabled {
    opacity: .65;
    cursor: wait;
}

/* ---------- Notices ---------- */
.tfac-notice {
    padding: 13px 15px;
    border-radius: 14px;
    background: var(--tfac-surface);
    border: 1px solid var(--tfac-border);
}

.tfac-notice--warning {
    border-color: #efd08e;
}

/* ---------- Responsive ---------- */
@media (max-width: 680px) {
    .tfac-wizard {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .tfac-wizard__sidebar {
        padding: 12px;
    }

    .tfac-steps {
        flex-direction: row;
        gap: 6px;
    }

    .tfac-step {
        flex: 1 1 0;
        flex-direction: column;
        gap: 6px;
        padding: 10px 6px;
        text-align: center;
    }

    .tfac-step__text {
        flex: 0 0 auto;
        align-items: center;
    }

    .tfac-step__num {
        font-size: 10px;
    }

    .tfac-step__label {
        font-size: 12px;
    }

    .tfac-step__dot {
        display: none;
    }

    .tfac-wizard__sidebar-foot {
        display: none;
    }

    .tfac-wizard__main {
        padding: 20px 16px 0;
    }

    .tfac-grid,
    .tfac-slot-list {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .tfac-panel__title {
        font-size: 21px;
    }

    .tfac-wizard__nav {
        flex-wrap: wrap;
    }

    .tfac-next,
    .tfac-submit {
        flex: 1 1 auto;
    }
}

@media (max-width: 380px) {
    .tfac-extra__row {
        flex-wrap: wrap;
    }

    .tfac-stepper {
        margin-left: auto;
    }

    .tfac-calendar-weekdays,
    .tfac-calendar-grid {
        gap: 4px;
    }

    .tfac-calendar-day,
    .tfac-calendar-empty {
        min-height: 30px;
    }

    .tfac-calendar-day {
        border-radius: 7px;
        font-size: 13px;
    }
}
