/* CitaFlow - Booking & Service Request
   Mobile-first, fluid, minimalist, modern
   Base = mobile → progressive enhancement for larger screens */

:root {
    --cf-primary: #1788FB;
    --cf-primary-hover: #1270d6;
    --cf-primary-light: rgba(23, 136, 251, 0.08);
    --cf-primary-glow: rgba(23, 136, 251, 0.25);
    --cf-secondary: #FF6B6B;
    --cf-success: #25D366;
    --cf-warning: #ffc107;
    --cf-danger: #dc3545;
    --cf-purple: #505392;
    --cf-sidebar: #1A2044;
    --cf-sidebar-light: #252B50;
    --cf-sidebar-text: rgba(255,255,255,0.55);
    --cf-sidebar-active: #fff;
    --cf-text: #1a1a2e;
    --cf-text-light: #555;
    --cf-text-muted: #999;
    --cf-bg: #fff;
    --cf-bg-light: #f7f8fb;
    --cf-bg-input: #f3f4f8;
    --cf-border: #e4e7f0;
    --cf-radius: 16px;
    --cf-radius-sm: 12px;
    --cf-radius-xs: 8px;
    --cf-shadow: 0 2px 12px rgba(0,0,0,0.06);
    --cf-shadow-lg: 0 8px 40px rgba(0,0,0,0.10);
    --cf-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    --cf-transition: 0.2s ease;
}

/* ─── Reset & Base ────────────────────────────────────────── */

.cf-wizard,
.cf-request {
    font-family: var(--cf-font);
    width: 100%;
    margin: clamp(16px, 4vw, 24px) auto;
    background: var(--cf-bg);
    border-radius: var(--cf-radius-sm);
    box-shadow: var(--cf-shadow);
    overflow: hidden;
    color: var(--cf-text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
    clear: both;
}

.cf-wizard *,
.cf-request * {
    box-sizing: border-box;
}

/* =====================================================
   BOOKING WIZARD
   Mobile-first: vertical stepper bar at top
   ===================================================== */

.cf-wizard {
    max-width: 860px;
    display: flex;
    flex-direction: column;
}

.cf-wizard__boot {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(255,255,255,0.94);
    z-index: 20;
}

.cf-wizard--booting .cf-wizard__sidebar,
.cf-wizard--booting .cf-wizard__main {
    visibility: hidden;
}

.cf-wizard--booting .cf-wizard__boot {
    display: flex;
    visibility: visible;
}

/* ─── Step Indicator (mobile: horizontal compact) ────────── */

.cf-wizard__sidebar {
    background: var(--cf-sidebar);
    padding: 16px 16px 0;
    width: 100%;
}

.cf-wizard__brand {
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: center;
    align-items: center;
    width: 100%;
    padding: 0 16px 14px;
}

.cf-wizard__brand--start {
    text-align: left;
    align-items: flex-start;
}

.cf-wizard__brand--center {
    text-align: center;
    align-items: center;
}

.cf-wizard__brand--end {
    text-align: right;
    align-items: flex-end;
}

.cf-wizard__logo {
    margin: 0;
    width: 100%;
    display: flex;
}

.cf-wizard__brand--start .cf-wizard__logo {
    justify-content: flex-start;
}

.cf-wizard__brand--center .cf-wizard__logo {
    justify-content: center;
}

.cf-wizard__brand--end .cf-wizard__logo {
    justify-content: flex-end;
}

.cf-wizard__logo img {
    max-height: 50px;
    max-width: 100%;
    object-fit: contain;
}

.cf-wizard__sidebar-title {
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    margin: 0;
    letter-spacing: 0.3px;
    text-align: inherit;
    width: 100%;
}

.cf-wizard__progress {
    padding: 0;
}

/* Hide old progress bar element kept for JS compatibility */
.cf-wizard__progress-bar { display: none; }

.cf-wizard__progress-steps {
    display: flex;
    justify-content: center;
    gap: 0;
    padding: 0 0 16px;
    margin: 0;
    position: relative;
}

/* Connecting line between steps */
.cf-wizard__progress-steps::before {
    content: '';
    position: absolute;
    top: 12px;
    left: 15%;
    right: 15%;
    height: 2px;
    background: rgba(255,255,255,0.12);
    z-index: 0;
}

.cf-wizard__step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 0;
    flex: 1;
    cursor: default;
    position: relative;
    z-index: 1;
}

.cf-wizard__step-number {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.2);
    color: var(--cf-sidebar-text);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
    flex-shrink: 0;
    transition: all 0.3s ease;
    background: var(--cf-sidebar);
}

.cf-wizard__step--active .cf-wizard__step-number {
    background: var(--cf-primary);
    border-color: var(--cf-primary);
    color: #fff;
    box-shadow: 0 0 0 4px var(--cf-primary-glow);
}

.cf-wizard__step--completed .cf-wizard__step-number {
    background: var(--cf-success);
    border-color: var(--cf-success);
    color: #fff;
}

.cf-wizard__step-icon {
    display: none;
}

.cf-wizard__step-label {
    font-size: 10px;
    color: var(--cf-sidebar-text);
    font-weight: 600;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color var(--cf-transition);
}

.cf-wizard__step--active .cf-wizard__step-label {
    color: var(--cf-sidebar-active);
}

.cf-wizard__step--completed .cf-wizard__step-label {
    color: rgba(255,255,255,0.8);
}

/* Active step indicator line */
.cf-wizard__step--active::before {
    display: none;
}

/* ─── Content Area (Mobile: full width) ──────────────────── */

.cf-wizard__main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.cf-wizard__panel {
    display: none;
    padding: 24px 16px;
    flex: 1;
    animation: cfFadeIn 0.25s ease;
}

.cf-wizard__panel--active {
    display: block;
}

@keyframes cfFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.cf-wizard__title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 20px;
    color: var(--cf-text);
}

.cf-wizard__subtitle {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 14px;
    color: var(--cf-text);
}

/* ─── Category, Service, Provider Cards ──────────────────── */

.cf-wizard__categories,
#cf-services-list,
#cf-providers-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.cf-category-card,
.cf-service-card,
.cf-provider-card {
    background: var(--cf-bg);
    border: 2px solid var(--cf-border);
    border-radius: var(--cf-radius-xs);
    padding: 18px 16px;
    text-align: center;
    cursor: pointer;
    transition: all var(--cf-transition);
    position: relative;
    min-height: 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
}

.cf-category-card:hover,
.cf-service-card:hover,
.cf-provider-card:hover {
    border-color: var(--cf-primary);
    box-shadow: 0 4px 16px rgba(23,136,251,0.12);
}

.cf-category-card:active,
.cf-service-card:active,
.cf-provider-card:active {
    transform: scale(0.98);
}

.cf-category-card--selected,
.cf-service-card--selected,
.cf-provider-card--selected {
    border-color: var(--cf-primary);
    background: var(--cf-primary-light);
    box-shadow: 0 4px 16px rgba(23,136,251,0.15);
}

.cf-category-card--selected::after,
.cf-service-card--selected::after,
.cf-provider-card--selected::after {
    content: '✓';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 22px;
    height: 22px;
    background: var(--cf-primary);
    color: #fff;
    border-radius: 50%;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.cf-category-card__icon {
    font-size: 32px;
    margin-bottom: 6px;
    display: block;
    line-height: 1;
}

.cf-category-card__name,
.cf-service-card__name,
.cf-provider-card__name {
    font-weight: 600;
    font-size: 15px;
    margin: 0;
    color: var(--cf-text);
}

.cf-service-card__meta {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 8px;
    font-size: 13px;
    color: var(--cf-text-muted);
}

.cf-provider-card__avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    margin: 0 auto 8px;
}

.cf-provider-card__avatar--placeholder {
    background: linear-gradient(135deg, var(--cf-primary), var(--cf-purple));
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    line-height: 48px;
    text-align: center;
}

.cf-wizard__back-link {
    background: none;
    border: none;
    color: var(--cf-primary);
    cursor: pointer;
    font-size: 14px;
    padding: 0;
    margin-bottom: 14px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: var(--cf-font);
    font-weight: 500;
    -webkit-tap-highlight-color: transparent;
}

.cf-wizard__back-link:hover {
    text-decoration: underline;
}

/* ─── Calendar ────────────────────────────────────────────── */

.cf-wizard__datetime {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cf-wizard__calendar {
    background: var(--cf-bg-light);
    border-radius: var(--cf-radius-xs);
    padding: 16px;
}

.cf-calendar__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.cf-calendar__month {
    font-weight: 700;
    font-size: 16px;
    text-transform: capitalize;
    color: var(--cf-text);
}

.cf-calendar__nav {
    background: var(--cf-bg);
    border: 1px solid var(--cf-border);
    border-radius: var(--cf-radius-xs);
    width: 40px;
    height: 40px;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--cf-transition);
    color: var(--cf-text);
    font-family: var(--cf-font);
    -webkit-tap-highlight-color: transparent;
}

.cf-calendar__nav:hover {
    background: var(--cf-primary);
    color: #fff;
    border-color: var(--cf-primary);
}

.cf-calendar__weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--cf-text-muted);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cf-calendar__days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.cf-calendar__day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 14px;
    cursor: default;
    transition: all var(--cf-transition);
    border: none;
    background: none;
    color: #ccc;
    font-family: var(--cf-font);
    font-weight: 500;
    min-width: 0;
    min-height: 36px;
    -webkit-tap-highlight-color: transparent;
}

.cf-calendar__day--available {
    color: var(--cf-text);
    cursor: pointer;
    font-weight: 600;
}

.cf-calendar__day--available:hover {
    background: var(--cf-primary-light);
    color: var(--cf-primary);
}

.cf-calendar__day--available:active {
    transform: scale(0.9);
}

.cf-calendar__day--selected {
    background: var(--cf-primary) !important;
    color: #fff !important;
    font-weight: 700;
    box-shadow: 0 2px 8px var(--cf-primary-glow);
}

.cf-calendar__day--today {
    border: 2px solid var(--cf-primary);
}

.cf-calendar__day--disabled {
    color: #d4d4d4;
    pointer-events: none;
}

.cf-calendar__day--other-month {
    opacity: 0;
    pointer-events: none;
}

/* ─── Time Slots ──────────────────────────────────────────── */

.cf-wizard__slots-hint {
    color: var(--cf-text-muted);
    font-size: 14px;
    text-align: center;
    padding: 20px 0;
}

.cf-wizard__slots-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.cf-slot-btn {
    padding: 14px 8px;
    border: 2px solid var(--cf-border);
    border-radius: var(--cf-radius-xs);
    background: var(--cf-bg);
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    transition: all var(--cf-transition);
    color: var(--cf-text);
    font-family: var(--cf-font);
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
}

.cf-slot-btn:hover {
    border-color: var(--cf-primary);
    color: var(--cf-primary);
    background: var(--cf-primary-light);
}

.cf-slot-btn:active {
    transform: scale(0.97);
}

.cf-slot-btn--selected {
    background: var(--cf-primary);
    border-color: var(--cf-primary);
    color: #fff;
    box-shadow: 0 2px 8px var(--cf-primary-glow);
}

/* ─── Form Fields ─────────────────────────────────────────── */

.cf-form__row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
}

.cf-form__group {
    margin-bottom: 16px;
}

.cf-turnstile-slot {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

.cf-form__label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--cf-text);
}

.cf-form__input,
.cf-form__select,
.cf-form__textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid transparent;
    border-radius: var(--cf-radius-xs);
    font-size: 16px; /* 16px prevents iOS zoom on focus */
    font-family: var(--cf-font);
    color: var(--cf-text);
    background: var(--cf-bg-input);
    transition: all var(--cf-transition);
    -webkit-appearance: none;
    appearance: none;
}

.cf-form__input:focus,
.cf-form__select:focus,
.cf-form__textarea:focus {
    outline: none;
    border-color: var(--cf-primary);
    background: var(--cf-bg);
    box-shadow: 0 0 0 3px rgba(23,136,251,0.1);
}

.cf-form__input::placeholder,
.cf-form__textarea::placeholder {
    color: var(--cf-text-muted);
}

.cf-form__input--error {
    border-color: var(--cf-danger);
}

.cf-form__error {
    display: block;
    font-size: 12px;
    color: var(--cf-danger);
    margin-top: 4px;
    min-height: 0;
}

.cf-form__error:not(:empty) {
    min-height: 16px;
}

.cf-context-switch {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.cf-context-option {
    position: relative;
    display: block;
    cursor: pointer;
}

.cf-context-option input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.cf-context-option span {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--cf-border);
    border-radius: var(--cf-radius-xs);
    background: var(--cf-bg-light);
    padding: 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--cf-text);
    transition: border-color var(--cf-transition), box-shadow var(--cf-transition), background var(--cf-transition);
}

.cf-context-option input:checked + span {
    background: var(--cf-primary-light);
    border-color: var(--cf-primary);
    box-shadow: 0 0 0 3px rgba(23,136,251,0.12);
}

.cf-context-panel {
    margin-top: 4px;
}

.cf-form__phone-wrapper {
    display: flex;
    align-items: center;
}

.cf-form__phone-prefix {
    padding: 14px;
    background: var(--cf-border);
    border-radius: var(--cf-radius-xs) 0 0 var(--cf-radius-xs);
    font-size: 15px;
    font-weight: 600;
    color: var(--cf-text-light);
    white-space: nowrap;
}

.cf-form__input--phone {
    border-radius: 0 var(--cf-radius-xs) var(--cf-radius-xs) 0;
}

.cf-form__select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

/* ─── Icon Inputs ─────────────────────────────────────────── */

.cf-input-icon {
    display: flex;
    align-items: center;
    background: var(--cf-bg-input);
    border-radius: var(--cf-radius-xs);
    border: 2px solid transparent;
    transition: all var(--cf-transition);
    overflow: hidden;
}

.cf-input-icon:focus-within {
    border-color: var(--cf-primary);
    background: var(--cf-bg);
    box-shadow: 0 0 0 3px rgba(23,136,251,0.1);
}

.cf-input-icon__prefix {
    width: 44px;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--cf-text-muted);
}

.cf-input-icon__prefix svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.cf-input-icon .cf-form__input {
    background: transparent;
    border: none;
    padding-left: 0;
}

.cf-input-icon .cf-form__input:focus {
    box-shadow: none;
    border: none;
}

.cf-input-icon .cf-form__phone-wrapper {
    display: flex;
    align-items: center;
    flex: 1;
}

.cf-input-icon .cf-form__phone-prefix {
    background: none;
    border-radius: 0;
    padding: 0 10px 0 0;
    border-right: 1px solid var(--cf-border);
    margin-right: 10px;
}

.cf-input-icon .cf-form__input--phone {
    border-radius: 0;
}

.cf-input-icon .cf-form__textarea,
.cf-input-icon textarea.cf-form__input {
    background: transparent;
    border: none;
    padding-left: 0;
    flex: 1;
}

.cf-input-icon .cf-form__textarea:focus,
.cf-input-icon textarea.cf-form__input:focus {
    box-shadow: none;
    border: none;
}

/* ─── Confirmation Summary ────────────────────────────────── */

.cf-confirmation__summary {
    background: var(--cf-bg-light);
    border-radius: var(--cf-radius-sm);
    padding: 20px;
}

.cf-summary__row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px solid var(--cf-border);
    font-size: 14px;
    gap: 12px;
}

.cf-summary__row:last-child {
    border-bottom: none;
}

.cf-summary__label {
    color: var(--cf-text-muted);
    font-weight: 500;
    flex-shrink: 0;
}

.cf-summary__value {
    font-weight: 600;
    text-align: right;
    color: var(--cf-text);
    word-break: break-word;
}

/* ─── Navigation Buttons ──────────────────────────────────── */

.cf-wizard__nav {
    display: flex;
    justify-content: space-between;
    padding: 0 16px 20px;
    gap: 12px;
}

.cf-wizard__btn {
    padding: 14px 28px;
    border: none;
    border-radius: var(--cf-radius-xs);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--cf-transition);
    font-family: var(--cf-font);
    letter-spacing: 0.2px;
    min-height: 48px;
    -webkit-tap-highlight-color: transparent;
}

.cf-wizard__btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.cf-wizard__btn--next {
    background: var(--cf-primary);
    color: #fff;
    margin-left: auto;
    flex: 1;
    max-width: 220px;
}

.cf-wizard__btn--next:hover:not(:disabled) {
    background: var(--cf-primary-hover);
    box-shadow: 0 4px 12px var(--cf-primary-glow);
}

.cf-wizard__btn--next:active:not(:disabled) {
    transform: scale(0.98);
}

.cf-wizard--button-gradient .cf-wizard__btn--next {
    background: linear-gradient(135deg, var(--cf-primary), var(--cf-secondary));
    box-shadow: 0 10px 24px rgba(23,136,251,0.18);
}

.cf-wizard--button-gradient .cf-wizard__btn--next:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--cf-primary-hover), var(--cf-secondary));
    box-shadow: 0 14px 28px rgba(23,136,251,0.24);
}

.cf-wizard__btn--back {
    background: transparent;
    color: var(--cf-text-light);
    border: 2px solid var(--cf-border);
}

.cf-wizard__btn--back:hover {
    background: var(--cf-bg-light);
    border-color: var(--cf-text-muted);
}

.cf-wizard__btn--whatsapp {
    background: #25D366;
    color: #fff;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    max-width: 220px;
    justify-content: center;
}

.cf-wizard__btn--whatsapp:hover:not(:disabled) {
    background: #20bd5a;
    box-shadow: 0 4px 12px rgba(37,211,102,0.3);
}

.cf-wizard__btn--whatsapp:active:not(:disabled) {
    transform: scale(0.98);
}

.cf-wizard__btn--whatsapp svg {
    flex-shrink: 0;
}

/* Device Info Section */
.cf-wizard__device-section {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--cf-border);
}

.cf-wizard__section-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--cf-text-light);
    margin: 0 0 16px;
}

/* Custom Fields */
#cf-custom-fields .cf-form__group {
    margin-bottom: 16px;
}

#cf-custom-fields .cf-form__checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 0;
}

#cf-custom-fields .cf-form__checkbox-wrapper input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--cf-primary);
}

/* ─── Success State ───────────────────────────────────────── */

.cf-wizard__success {
    text-align: center;
    padding: 20px 0;
}

.cf-success__icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #25D366, #20bd5a);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin: 0 auto 16px;
    animation: cfBounceIn 0.5s ease;
    box-shadow: 0 4px 16px rgba(37,211,102,0.3);
}

@keyframes cfBounceIn {
    0% { transform: scale(0); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

.cf-success__title {
    text-align: center;
    font-size: 22px;
    margin: 0 0 6px;
    color: var(--cf-text);
}

.cf-success__code {
    text-align: center;
    font-size: 16px;
    color: var(--cf-text-light);
    margin: 0 0 20px;
    font-weight: 500;
}

.cf-success__actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.cf-success__link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--cf-radius-xs);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--cf-transition);
    border: 2px solid var(--cf-border);
    color: var(--cf-text);
    background: var(--cf-bg);
    min-height: 48px;
    -webkit-tap-highlight-color: transparent;
}

.cf-success__link:hover {
    border-color: var(--cf-primary);
    color: var(--cf-primary);
    background: var(--cf-primary-light);
}

.cf-success__qr {
    margin-top: 24px;
    text-align: center;
}

.cf-success__qr img {
    border-radius: var(--cf-radius-sm);
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.cf-success__qr-label {
    margin-top: 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--cf-text-light);
    letter-spacing: 1.5px;
}

.cf-success__message {
    color: var(--cf-text-light);
    font-size: 15px;
    margin: 0 0 16px;
    line-height: 1.6;
}

/* =====================================================
   SERVICE REQUEST FORM
   ===================================================== */

.cf-request {
    max-width: 720px;
}

.cf-request__form {
    padding: 24px 16px;
}

.cf-request__title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 4px;
    color: var(--cf-text);
}

.cf-request__subtitle {
    color: var(--cf-text-light);
    margin: 0 0 24px;
    font-size: 14px;
    line-height: 1.6;
}

/* ─── Urgency Pills ───────────────────────────────────────── */

.cf-request__urgency {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.cf-urgency__option {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.cf-urgency__option input { display: none; }

.cf-urgency__label {
    display: inline-block;
    padding: 10px 18px;
    border-radius: 24px;
    font-size: 13px;
    font-weight: 600;
    border: 2px solid var(--cf-border);
    transition: all var(--cf-transition);
    min-height: 44px;
    line-height: 20px;
}

.cf-urgency__option input:checked + .cf-urgency__label--low {
    border-color: #25D366; background: rgba(37,211,102,0.08); color: #1a9e4a;
}
.cf-urgency__option input:checked + .cf-urgency__label--normal {
    border-color: var(--cf-primary); background: var(--cf-primary-light); color: var(--cf-primary);
}
.cf-urgency__option input:checked + .cf-urgency__label--high {
    border-color: var(--cf-warning); background: rgba(255,193,7,0.08); color: #b88a00;
}
.cf-urgency__option input:checked + .cf-urgency__label--urgent {
    border-color: var(--cf-danger); background: rgba(220,53,69,0.08); color: var(--cf-danger);
}

/* ─── Dual Action Buttons (Email + WhatsApp) ──────────────── */

.cf-request__actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
}

.cf-request__submit-email,
.cf-request__submit-whatsapp {
    flex: 1;
    padding: 16px 24px;
    border: none;
    border-radius: var(--cf-radius-xs);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--cf-transition);
    font-family: var(--cf-font);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    letter-spacing: 0.2px;
    min-height: 52px;
    -webkit-tap-highlight-color: transparent;
}

.cf-request__submit-email {
    background: var(--cf-purple);
    color: #fff;
}

.cf-request__submit-email:hover {
    background: #3f4280;
    box-shadow: 0 4px 16px rgba(80,83,146,0.3);
}

.cf-request__submit-email:active {
    transform: scale(0.98);
}

.cf-request__submit-whatsapp {
    background: #25D366;
    color: #fff;
}

.cf-request__submit-whatsapp:hover {
    background: #20bd5a;
    box-shadow: 0 4px 16px rgba(37,211,102,0.3);
}

.cf-request__submit-whatsapp:active {
    transform: scale(0.98);
}

.cf-request__submit-email:disabled,
.cf-request__submit-whatsapp:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.cf-request__submit-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.cf-request__submit-icon svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* Hide old contact method toggle */
.cf-request__contact-method { display: none; }

.cf-request__success {
    padding: 48px 20px;
    text-align: center;
}

/* ─── Async Status ───────────────────────────────────────── */

.cf-wizard__async-status {
    margin: 0 0 18px;
    padding: 12px 14px;
    border: 1px solid var(--cf-border);
    border-radius: var(--cf-radius-xs);
    background: var(--cf-bg-light);
}

.cf-wizard__async-status--loading {
    border-color: rgba(23, 136, 251, 0.18);
    background: rgba(23, 136, 251, 0.06);
}

.cf-wizard__async-status--done {
    border-color: rgba(37, 211, 102, 0.2);
    background: rgba(37, 211, 102, 0.08);
}

.cf-wizard__async-status--error {
    border-color: rgba(220, 53, 69, 0.2);
    background: rgba(220, 53, 69, 0.08);
}

.cf-wizard__async-status-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.cf-wizard__async-status-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--cf-text);
}

.cf-wizard__async-status-time {
    font-size: 12px;
    color: var(--cf-text-light);
    white-space: nowrap;
}

.cf-wizard__async-status-bar {
    position: relative;
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.08);
}

.cf-wizard__async-status-fill {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--cf-primary) 0%, #7eb8ff 50%, var(--cf-primary) 100%);
    transform: translateX(-100%);
    animation: cfAsyncLoading 1.2s ease-in-out infinite;
}

.cf-wizard__async-status--done .cf-wizard__async-status-fill {
    width: 100%;
    transform: none;
    animation: none;
    background: var(--cf-success);
}

.cf-wizard__async-status--error .cf-wizard__async-status-fill {
    width: 100%;
    transform: none;
    animation: none;
    background: var(--cf-danger);
}

.cf-wizard__async-status-detail {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    color: var(--cf-text-light);
}

@keyframes cfAsyncLoading {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* ─── Loading Spinner ─────────────────────────────────────── */

.cf-wizard__loading {
    text-align: center;
    padding: 40px 16px;
    color: var(--cf-text-muted);
    font-size: 14px;
}

.cf-wizard__loading::before {
    content: '';
    display: block;
    width: 32px;
    height: 32px;
    border: 3px solid var(--cf-border);
    border-top-color: var(--cf-primary);
    border-radius: 50%;
    margin: 0 auto 12px;
    animation: cfSpin 0.8s linear infinite;
}

@keyframes cfSpin {
    to { transform: rotate(360deg); }
}

/* =====================================================
   TABLET & DESKTOP (≥700px)
   Progressive enhancement
   ===================================================== */

@media (min-width: 700px) {

    .cf-wizard,
    .cf-request {
        box-shadow: var(--cf-shadow-lg);
        margin: 24px auto;
    }

    /* Wizard becomes horizontal layout with sidebar */
    .cf-wizard {
        flex-direction: row;
        min-height: 520px;
        border-radius: var(--cf-radius);
    }

    .cf-wizard__sidebar {
        width: 220px;
        flex-shrink: 0;
        padding: 28px 0;
        border-radius: var(--cf-radius) 0 0 var(--cf-radius);
    }

    .cf-wizard__brand {
        padding: 0 20px 20px;
        border-bottom: 1px solid rgba(255,255,255,0.08);
    }

    .cf-wizard__logo {
        margin: 0;
    }

    .cf-wizard__logo img {
        max-height: 60px;
    }

    .cf-wizard__sidebar-title {
        font-size: 15px;
    }

    /* Steps become vertical in sidebar */
    .cf-wizard__progress-steps {
        flex-direction: column;
        gap: 0;
        padding: 16px 0;
    }

    .cf-wizard__progress-steps::before {
        display: none;
    }

    .cf-wizard__step {
        flex-direction: row;
        gap: 12px;
        padding: 12px 20px;
        position: relative;
    }

    .cf-wizard__step--active {
        background: var(--cf-sidebar-light);
    }

    .cf-wizard__step--active::before {
        display: block;
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 3px;
        background: var(--cf-primary);
        border-radius: 0 3px 3px 0;
    }

    .cf-wizard__step--active .cf-wizard__step-number {
        box-shadow: none;
    }

    /* Show icons on desktop */
    .cf-wizard__step-icon {
        display: flex;
        width: 20px;
        height: 20px;
        flex-shrink: 0;
        align-items: center;
        justify-content: center;
        opacity: 0.5;
    }

    .cf-wizard__step--active .cf-wizard__step-icon,
    .cf-wizard__step--completed .cf-wizard__step-icon {
        opacity: 1;
    }

    .cf-wizard__step-icon svg {
        width: 18px;
        height: 18px;
        stroke: var(--cf-sidebar-text);
        fill: none;
        stroke-width: 2;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .cf-wizard__step--active .cf-wizard__step-icon svg {
        stroke: #fff;
    }

    .cf-wizard__step--completed .cf-wizard__step-icon svg {
        stroke: var(--cf-success);
    }

    /* Hide step numbers on desktop (icons replace them) */
    .cf-wizard__step-number {
        display: none;
    }

    .cf-wizard__step-label {
        font-size: 14px;
        text-transform: none;
        letter-spacing: 0;
    }

    .cf-wizard__step--active .cf-wizard__step-label {
        font-weight: 600;
    }

    /* Content area */
    .cf-wizard__panel {
        padding: 32px;
    }

    .cf-wizard__title {
        font-size: 22px;
        margin-bottom: 24px;
    }

    .cf-wizard__nav {
        padding: 0 32px 28px;
    }

    /* Cards grid */
    .cf-wizard__categories,
    #cf-services-list,
    #cf-providers-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    .cf-category-card,
    .cf-service-card,
    .cf-provider-card {
        padding: 22px 16px;
    }

    .cf-category-card:hover,
    .cf-service-card:hover,
    .cf-provider-card:hover {
        transform: translateY(-2px);
    }

    /* Calendar + slots side by side */
    .cf-wizard__datetime {
        flex-direction: row;
    }

    .cf-wizard__calendar {
        flex: 0 0 55%;
        padding: 20px;
    }

    .cf-wizard__slots {
        flex: 1;
    }

    /* Slots grid */
    .cf-wizard__slots-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Form rows side by side */
    .cf-form__row {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }

    /* Summary */
    .cf-confirmation__summary {
        padding: 24px;
    }

    .cf-summary__row {
        font-size: 15px;
    }

    /* Success actions horizontal */
    .cf-success__actions {
        flex-direction: row;
        justify-content: center;
    }

    /* Service request */
    .cf-request__form {
        padding: 32px;
    }

    .cf-request__title {
        font-size: 22px;
    }

    .cf-request__actions {
        flex-direction: row;
        gap: 16px;
    }

    .cf-request__submit-email,
    .cf-request__submit-whatsapp {
        min-height: 52px;
    }
}

/* ─── Large Desktop (≥1000px) ─────────────────────────────── */

@media (min-width: 1000px) {
    .cf-wizard__sidebar {
        width: 240px;
        padding: 32px 0;
    }

    .cf-wizard__sidebar-title {
        padding: 0;
    }

    .cf-wizard__step {
        padding: 14px 24px;
    }

    .cf-wizard__panel {
        padding: 36px;
    }

    .cf-wizard__nav {
        padding: 0 36px 32px;
    }

    .cf-wizard__slots-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
