/* =============================================================
   C4B Meeting Booking System – Front-end Styles (Sidebar Edition)
   ============================================================= */

/* ── Brand Typeface ────────────────────────────────────────── */
/* If "BT Curve" isn't already registered on the site via an
   @font-face / enqueued stylesheet, add that here (or ask your
   dev team for the .woff2 files) — this stack falls back to the
   system font gracefully until then. */
.c4bbook-inline-container, .c4bbook-inline-container *,
.c4bbook-modal-container, .c4bbook-modal-container *,
.c4b-portal-container, .c4b-portal-container *,
.c4bbook-floating-btn, .c4bbook-floating-btn * {
    font-family: 'BT Curve', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ── Theme variables (manual light/dark toggle) ───────────── */
.c4bbook-inline-container,
.c4bbook-modal-container,
.c4b-portal-container {
    --c4b-bg: #ffffff;
    --c4b-surface: #ffffff;
    --c4b-bg-alt: #f4f2fa;
    --c4b-border: #ece5fb;
    --c4b-border-strong: #d1d5db;
    --c4b-text: #171523;
    --c4b-text-secondary: #6b7280;
    --c4b-text-muted: #9691a4;
    --c4b-accent: #6d28d9;
    --c4b-sidebar-start: #faf7ff;
    --c4b-sidebar-end: #f4f0fd;
    --c4b-nav-bg: #fcfbff;
    --c4b-input-bg: #ffffff;
    --c4b-empty-bg: rgba(255,255,255,.6);
    --c4b-empty-border: #d8cdf5;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.c4bbook-inline-container.c4b-theme-dark,
.c4bbook-modal-container.c4b-theme-dark,
.c4b-portal-container.c4b-theme-dark {
    --c4b-bg: #1b1626;
    --c4b-surface: #241e33;
    --c4b-bg-alt: #2c2440;
    --c4b-border: #3a3050;
    --c4b-border-strong: #4b3f66;
    --c4b-text: #f2eefa;
    --c4b-text-secondary: #b7add0;
    --c4b-text-muted: #8f84ad;
    --c4b-accent: #b794f4;
    --c4b-sidebar-start: #241e33;
    --c4b-sidebar-end: #1b1626;
    --c4b-nav-bg: #201a2c;
    --c4b-input-bg: #2c2440;
    --c4b-empty-bg: rgba(255,255,255,.05);
    --c4b-empty-border: #4b3f66;
}

/* Step titles and the calendar's weekday/month/date text are purple on
   light mode, but switch to plain white in dark mode for readability
   (purple-on-near-black is low contrast). */
.c4bbook-inline-container.c4b-theme-dark .c4bbook-step-title,
.c4bbook-modal-container.c4b-theme-dark .c4bbook-step-title,
.c4b-portal-container.c4b-theme-dark .c4bbook-step-title {
    color: #fff;
}
.c4bbook-inline-container.c4b-theme-dark .c4bbook-calendar-header span,
.c4bbook-modal-container.c4b-theme-dark .c4bbook-calendar-header span,
.c4bbook-inline-container.c4b-theme-dark .c4bbook-calendar-weekdays,
.c4bbook-modal-container.c4b-theme-dark .c4bbook-calendar-weekdays {
    color: #fff;
}
.c4bbook-inline-container.c4b-theme-dark .c4bbook-calendar-day:not(.disabled):not(.selected),
.c4bbook-modal-container.c4b-theme-dark .c4bbook-calendar-day:not(.disabled):not(.selected) {
    color: #fff;
}

/* ── Theme toggle button ───────────────────────────────────── */
.c4b-theme-toggle {
    background: rgba(255,255,255,.15);
    border: none;
    color: white;
    width: 30px; height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    transition: background .15s ease;
    flex-shrink: 0;
}
.c4b-theme-toggle:hover { background: rgba(255,255,255,.28); }
.c4b-theme-toggle svg { width: 16px; height: 16px; display: block; }
/* Icons are hard-coded characters (not SVG) — some WordPress themes/
   builders run shortcode output through wp_kses_post, whose default
   allowed-tags list does not include <svg>/<path>/<circle>/<line>, so
   inline SVG icons can silently vanish (leaving just the round button
   background) even though they render fine in a raw HTML preview.
   Plain text characters can never be stripped that way. */
.c4b-theme-toggle .c4b-icon-sun,
.c4b-theme-toggle .c4b-icon-moon {
    font-size: 16px;
    line-height: 1;
    font-style: normal;
}
.c4b-theme-toggle .c4b-icon-sun { display: none; }
.c4bbook-inline-container.c4b-theme-dark .c4b-theme-toggle .c4b-icon-moon,
.c4bbook-modal-container.c4b-theme-dark .c4b-theme-toggle .c4b-icon-moon,
.c4b-portal-container.c4b-theme-dark .c4b-theme-toggle .c4b-icon-moon {
    display: none;
}
.c4bbook-inline-container.c4b-theme-dark .c4b-theme-toggle .c4b-icon-sun,
.c4bbook-modal-container.c4b-theme-dark .c4b-theme-toggle .c4b-icon-sun,
.c4b-portal-container.c4b-theme-dark .c4b-theme-toggle .c4b-icon-sun {
    display: block;
}
.c4bbook-modal-header .c4b-theme-toggle {
    position: absolute;
    top: 12px; right: 52px;
}
.c4bbook-inline-header, .c4b-portal-header { position: relative; }
.c4bbook-inline-header .c4b-theme-toggle,
.c4b-portal-header .c4b-theme-toggle {
    position: absolute;
    top: 14px; right: 16px;
}

/* ── Floating Button ──────────────────────────────────────── */
.c4bbook-floating-btn {
    position: fixed;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    color: white;
    box-shadow: 0 8px 24px rgba(0,0,0,.2);
    cursor: pointer;
    z-index: 9998;
    transition: all .3s;
    font-weight: 600;
    border: none;
    border-radius: 50px;
}
.c4bbook-floating-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0,0,0,.25);
}
@media (max-width: 768px) {
    .c4bbook-floating-btn .c4bbook-btn-text { display: none; }
    .c4bbook-floating-btn { padding: 16px; border-radius: 50% !important; }
}

/* ── Modal Overlay ────────────────────────────────────────── */
#c4bbook-modal {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 9999999;
}
.c4bbook-modal-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(17,24,39,.55);
    backdrop-filter: blur(4px);
}
.c4bbook-modal-container {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%,-50%);
    width: 92%;
    max-width: 740px;
    max-height: 86vh;
    background: var(--c4b-bg);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(17,24,39,.35);
    display: flex;
    flex-direction: column;
}
.c4bbook-modal-header {
    padding: 18px 24px;
    color: white;
    display: flex;
    flex-direction: column;
    gap: 2px;
    position: relative;
}
.c4bbook-modal-header h3 {
    margin: 0;
    font-size: 23px;
    font-weight: 700;
    color: white;
    letter-spacing: -0.2px;
    padding-right: 66px;
}
.c4bbook-modal-header-subtitle {
    margin: 0;
    font-size: 15px;
    opacity: .9;
    color: white;
    font-weight: 500;
}
.c4bbook-modal-close {
    position: absolute;
    top: 12px; right: 14px;
    background: rgba(255,255,255,.15);
    border: none;
    color: white;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 30px; height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background .15s ease;
}
.c4bbook-modal-close:hover { background: rgba(255,255,255,.28); }
.c4bbook-modal-body {
    padding: 0;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--c4b-bg);
}

/* ── Inline Container ─────────────────────────────────────── */
.c4bbook-inline-container {
    max-width: 780px;
    margin: 0 auto;
    background: var(--c4b-bg);
    border-radius: 6px;
    box-shadow: 0 4px 24px rgba(17,24,39,.1);
    overflow: hidden;
    border: 1px solid var(--c4b-border);
}
.c4bbook-inline-header {
    padding: 22px 26px;
    text-align: center;
}
.c4bbook-inline-header h3 {
    margin: 0;
    font-size: 25px;
    color: white;
    font-weight: 700;
    letter-spacing: -0.2px;
}
.c4bbook-inline-header p {
    margin: 5px 0 0;
    opacity: .92;
    color: white;
    font-size: 15.5px;
    font-weight: 500;
}
.c4bbook-inline-body { padding: 0; background: var(--c4b-bg); }

/* ── Two-column layout: sidebar + main step content ───────── */
.c4bbook-layout {
    display: flex;
    align-items: stretch;
}
.c4bbook-sidebar {
    width: 230px;
    flex: 0 0 230px;
    background: linear-gradient(180deg, var(--c4b-sidebar-start) 0%, var(--c4b-sidebar-end) 100%);
    border-right: 1px solid var(--c4b-border);
    padding: 22px 20px;
    box-sizing: border-box;
}
.c4bbook-sidebar-inner { position: sticky; top: 0; }
.c4bbook-sidebar-title {
    margin: 0 0 12px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: var(--c4b-accent);
}
.c4bbook-sidebar-empty {
    margin: 0;
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--c4b-text-muted);
    padding: 10px 12px;
    background: var(--c4b-empty-bg);
    border: 1px dashed var(--c4b-empty-border);
    border-radius: 10px;
}
.c4bbook-sidebar-items { display: flex; flex-direction: column; gap: 12px; }
.c4bbook-sidebar-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: var(--c4b-surface);
    border: 1px solid var(--c4b-border);
    border-radius: 10px;
    padding: 10px 12px;
    box-shadow: 0 1px 2px rgba(17,24,39,.04);
    animation: c4b-fade-in .25s ease;
}
.c4bbook-sidebar-icon {
    flex: 0 0 26px;
    width: 26px; height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}
.c4bbook-sidebar-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.c4bbook-sidebar-label {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .4px;
    color: var(--c4b-text-muted);
}
.c4bbook-sidebar-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--c4b-text);
    line-height: 1.35;
    word-break: break-word;
}
.c4bbook-sidebar-value small { font-weight: 500; color: var(--c4b-text-secondary); }

.c4bbook-layout.c4bbook-no-sidebar .c4bbook-sidebar { display: none; }
.c4bbook-main { flex: 1 1 auto; min-width: 0; background: var(--c4b-bg); }

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

.c4bbook-modal-body .c4bbook-main,
.c4bbook-inline-body .c4bbook-main { padding: 22px 24px; }

/* ── Step Containers ──────────────────────────────────────── */
.c4bbook-inline-step,
.c4bbook-step { min-height: 300px; }
@media (max-width: 480px) {
    .c4bbook-inline-step,
    .c4bbook-step { min-height: 100px; }
}

/* ── Step Titles & Subtitles (readability) ────────────────── */
.c4bbook-step-title {
    margin: 0 0 6px;
    font-size: 23px;
    font-weight: 700;
    color: var(--c4b-color, #5a15a8);
    letter-spacing: -0.3px;
    line-height: 1.25;
}
.c4bbook-step-subtitle {
    margin: 0 0 18px;
    font-size: 15.5px;
    color: var(--c4b-text-secondary);
    line-height: 1.5;
    font-weight: 500;
}
@media (max-width: 480px) {
    .c4bbook-step-title { font-size: 20px; }
    .c4bbook-step-subtitle { font-size: 14.5px; margin-bottom: 14px; }
}

/* ── Services Grid (professional card redesign) ───────────── */
.c4bbook-services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
.c4bbook-service-card {
    padding: 16px;
    border: 1.5px solid var(--c4b-border);
    border-radius: 12px;
    cursor: pointer;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease, background .18s ease;
    background: var(--c4b-surface);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.c4bbook-service-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; bottom: 0;
    width: 4px;
    background: var(--card-color, #5a15a8);
    opacity: 0;
    transition: opacity .18s ease;
}
.c4bbook-service-card:hover {
    border-color: var(--card-color, #5a15a8);
    box-shadow: 0 6px 18px rgba(17,24,39,.08);
    transform: translateY(-2px);
}
.c4bbook-service-card.selected {
    border-color: var(--card-color, #5a15a8);
    background: color-mix(in srgb, var(--card-color, #5a15a8) 8%, var(--c4b-surface));
    box-shadow: 0 6px 18px rgba(17,24,39,.1);
}
.c4bbook-service-card.selected::before { opacity: 1; }
/* Desktop/tablet only (the ≤480px mobile view uses colored pills instead
   and never shows this grid at all) — let each card's admin-configured
   color show as a persistent accent stripe at rest, not just on
   hover/selected, so services are distinguishable by color at a glance. */
@media (min-width: 481px) {
    .c4bbook-service-card::before { opacity: .55; }
    .c4bbook-service-card:hover::before,
    .c4bbook-service-card.selected::before { opacity: 1; }
}
.c4bbook-service-card.selected::after {
    content: '✓';
    position: absolute;
    top: 10px; right: 10px;
    width: 20px; height: 20px;
    background: var(--card-color, var(--c4b-color, #5a15a8));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(17,24,39,.25);
}
.c4bbook-service-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.c4bbook-service-icon {
    width: 34px; height: 34px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 34px;
}
.c4bbook-service-icon svg { width: 17px; height: 17px; }
.c4bbook-service-card h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: var(--c4b-text);
    line-height: 1.3;
    padding-right: 20px;
    letter-spacing: .2px;
}
.c4bbook-service-card p {
    margin: 0;
    font-size: 12.5px;
    color: var(--c4b-text-secondary);
    line-height: 1.45;
}
.c4bbook-service-duration {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    align-self: flex-start;
    padding: 3px 10px;
    background: var(--c4b-bg-alt);
    color: var(--c4b-text-secondary);
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}
.c4bbook-service-duration svg { width: 11px; height: 11px; opacity: .75; }

/* ── Service Pills (Mobile) ───────────────────────────────── */
.c4bbook-service-pills {
    display: none;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 4px;
}
.c4bbook-service-pill {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 16px;
    border-radius: 8px;
    border: none;
    color: white;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all .18s ease;
    flex: 1 0 auto;
    text-align: center;
    min-width: 90px;
    box-shadow: 0 3px 10px rgba(17,24,39,.18);
}
.c4bbook-service-pill:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 16px rgba(17,24,39,.26);
}
.c4bbook-service-pill.selected {
    outline: 3px solid #fff;
    outline-offset: -3px;
    box-shadow: 0 0 0 3px #5a15a8, 0 4px 16px rgba(17,24,39,.26);
}
.c4bbook-service-pill .pill-duration {
    font-weight: 600;
    opacity: .9;
    font-size: 11.5px;
}

@media (max-width: 480px) {
    .c4bbook-services-grid {
        display: none !important;
    }
    .c4bbook-services-select {
        display: none !important;
    }
    .c4bbook-service-pills {
        display: flex !important;
    }
    .c4bbook-service-pill {
        font-size: 12.5px;
        padding: 10px 14px;
        min-width: 60px;
    }
}

/* ── Calendar ─────────────────────────────────────────────── */
.c4bbook-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.c4bbook-calendar-header button {
    background: var(--c4b-bg-alt);
    border: none;
    padding: 6px 13px;
    border-radius: 16px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    color: var(--c4b-text-secondary);
}
.c4bbook-calendar-header button:hover { filter: brightness(0.95); }
.c4bbook-calendar-header span { font-weight: 700; color: var(--c4b-color, #5a15a8); }
/* True 5-column Mon–Fri grid. Each date is a compact circular badge
   (fixed size, centered in its column) rather than a large filled
   square, so the grid takes up noticeably less vertical space. */
.c4bbook-calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    text-align: center;
    font-weight: 700;
    color: var(--c4b-color, #5a15a8);
    margin-bottom: 4px;
    font-size: 10.5px;
    letter-spacing: .2px;
}
.c4bbook-calendar-days {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    justify-items: center;
    row-gap: 6px;
}
.c4bbook-calendar-day {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1.5px solid color-mix(in srgb, var(--c4b-color, #0018F9) 35%, transparent);
    cursor: pointer;
    font-size: 12.5px;
    font-weight: 600;
    background: transparent;
    color: var(--c4b-color, #0018F9);
    transition: background .15s ease, border-color .15s ease;
}
.c4bbook-calendar-day:hover:not(.disabled) {
    background: color-mix(in srgb, var(--c4b-color, #5a15a8) 10%, transparent);
    border-color: var(--c4b-color, #5a15a8);
}
.c4bbook-calendar-day.selected {
    background: var(--c4b-color, #5a15a8) !important;
    border-color: var(--c4b-color, #5a15a8) !important;
    color: white !important;
    font-weight: 700;
}
.c4bbook-calendar-day.today {
    background: var(--c4b-color, #5a15a8);
    border-color: var(--c4b-color, #5a15a8);
    color: #fff;
    font-weight: 700;
}
.c4bbook-calendar-day.today:hover:not(.disabled) {
    background: var(--c4b-color, #5a15a8);
    border-color: var(--c4b-color, #5a15a8);
    opacity: .9;
}
.c4bbook-calendar-day.disabled {
    opacity: .35;
    cursor: not-allowed;
    pointer-events: none;
    border-color: var(--c4b-border, #e5e7eb);
    color: var(--c4b-text-muted);
}
.c4bbook-calendar-day.blank {
    visibility: hidden;
    pointer-events: none;
    cursor: default;
}
.c4bbook-calendar-empty {
    text-align: center;
    padding: 28px 12px 8px;
    margin: 0;
    color: var(--c4b-text-secondary);
    font-size: 13px;
    line-height: 1.6;
}

/* ── Time Slots ───────────────────────────────────────────── */
.c4bbook-slots-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.c4bbook-slot {
    padding: 10px 6px;
    text-align: center;
    border: 1.5px solid var(--c4b-border);
    border-radius: 8px;
    cursor: pointer;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--c4b-text);
    background: var(--c4b-surface);
    transition: border-color .15s ease, background .15s ease;
}
.c4bbook-slot:hover:not(.unavailable) {
    border-color: var(--c4b-color, #5a15a8);
    background: var(--c4b-bg-alt);
}
.c4bbook-slot.selected {
    background: var(--c4b-color, #5a15a8) !important;
    color: white !important;
    border-color: var(--c4b-color, #5a15a8) !important;
}
.c4bbook-slot.unavailable {
    opacity: .4;
    cursor: not-allowed;
    text-decoration: line-through;
    background: var(--c4b-bg-alt);
    position: relative;
}
.c4bbook-slot.unavailable:hover {
    transform: none;
    border-color: var(--c4b-border);
}
.c4bbook-slot.unavailable::after {
    content: '✕';
    position: absolute;
    right: 4px; top: 2px;
    font-size: 8px;
    color: #dc2626;
}

/* ── Step 4: Customer Details - Professional Styling ────── */

/* Container for the form */
#c4bbook-booking-form,
#c4bbook-inline-booking-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0;
    margin: 0;
}

/* Each field group */
#c4bbook-booking-form .c4b-field-group,
#c4bbook-inline-booking-form .c4b-field-group {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

/* Floating labels (label sits inside the input, like a placeholder,
   and floats to the top edge on focus / once filled) */
#c4bbook-booking-form .c4b-field-group.c4b-floating,
#c4bbook-inline-booking-form .c4b-field-group.c4b-floating {
    display: block;
    position: relative;
}
#c4bbook-booking-form .c4b-field-group.c4b-floating input,
#c4bbook-inline-booking-form .c4b-field-group.c4b-floating input {
    width: 100%;
    /* Vertical centering of the label below relies on this input's
       rendered height being exactly its content+padding+border box —
       some WordPress themes set a global line-height and/or vertical
       margin on all <input> elements, which inflates the box that the
       label's top:50%/translateY(-50%) math is centered against, so
       the label ends up visibly off-centre even though nothing here
       looks wrong in an isolated preview. Pin these down explicitly
       so the centering is correct regardless of the host theme. */
    margin: 0 !important;
    line-height: 1.3 !important;
    box-sizing: border-box !important;
}
#c4bbook-booking-form .c4b-field-group.c4b-floating label,
#c4bbook-inline-booking-form .c4b-field-group.c4b-floating label {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    margin: 0 !important;
    padding: 0 4px;
    font-size: 14.5px;
    font-weight: 500;
    line-height: 1 !important;
    letter-spacing: 0;
    color: var(--c4b-text-muted);
    background: transparent;
    pointer-events: none;
    transition: top .15s ease, transform .15s ease, font-size .15s ease, color .15s ease, background .15s ease;
    max-width: calc(100% - 26px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-sizing: border-box;
}
#c4bbook-booking-form .c4b-field-group.c4b-floating input:focus + label,
#c4bbook-booking-form .c4b-field-group.c4b-floating input:not(:placeholder-shown) + label,
#c4bbook-inline-booking-form .c4b-field-group.c4b-floating input:focus + label,
#c4bbook-inline-booking-form .c4b-field-group.c4b-floating input:not(:placeholder-shown) + label {
    top: 0;
    transform: translateY(-50%) scale(0.83);
    left: 10px;
    color: #5a15a8;
    font-weight: 700;
    background: var(--c4b-input-bg);
}

/* Labels - clean and professional */
#c4bbook-booking-form .c4b-field-group label,
#c4bbook-inline-booking-form .c4b-field-group label {
    font-size: 13px;
    font-weight: 700;
    color: var(--c4b-text);
    letter-spacing: 0.2px;
    margin: 0;
    padding: 0;
    display: block;
}

/* Required asterisk */
#c4bbook-booking-form .c4b-field-group label .required-star,
#c4bbook-inline-booking-form .c4b-field-group label .required-star {
    color: #ef4444;
    margin-left: 2px;
}

/* Input fields - clean and modern */
#c4bbook-booking-form .c4b-field-group input,
#c4bbook-booking-form .c4b-field-group select,
#c4bbook-booking-form .c4b-field-group textarea,
#c4bbook-inline-booking-form .c4b-field-group input,
#c4bbook-inline-booking-form .c4b-field-group select,
#c4bbook-inline-booking-form .c4b-field-group textarea {
    width: 100%;
    padding: 11px 13px;
    font-size: 14.5px;
    font-family: 'BT Curve', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--c4b-text);
    background: var(--c4b-input-bg);
    border: 1.5px solid color-mix(in srgb, var(--c4b-color, #5a15a8) 40%, transparent);
    border-radius: 9px;
    transition: all 0.2s ease;
    box-sizing: border-box;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

/* Input focus states */
#c4bbook-booking-form .c4b-field-group input:focus,
#c4bbook-booking-form .c4b-field-group select:focus,
#c4bbook-booking-form .c4b-field-group textarea:focus,
#c4bbook-inline-booking-form .c4b-field-group input:focus,
#c4bbook-inline-booking-form .c4b-field-group select:focus,
#c4bbook-inline-booking-form .c4b-field-group textarea:focus {
    border-color: #5a15a8;
    box-shadow: 0 0 0 3px rgba(90, 21, 168, 0.1);
}

/* Placeholder styling (uses the lighter "secondary" tone so it stays
   legible against the dark input background in dark mode too) */
#c4bbook-booking-form .c4b-field-group input::placeholder,
#c4bbook-booking-form .c4b-field-group textarea::placeholder,
#c4bbook-inline-booking-form .c4b-field-group input::placeholder,
#c4bbook-inline-booking-form .c4b-field-group textarea::placeholder {
    color: var(--c4b-text-secondary);
    opacity: 1;
    font-size: 13.5px;
    font-weight: 400;
}

/* Select dropdown styling */
#c4bbook-booking-form .c4b-field-group select,
#c4bbook-inline-booking-form .c4b-field-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239691a4' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    cursor: pointer;
}

/* Textarea styling */
#c4bbook-booking-form .c4b-field-group textarea,
#c4bbook-inline-booking-form .c4b-field-group textarea {
    resize: vertical;
    min-height: 40px;
    line-height: 1.4;
}

/* Grid layout for 2-column fields */
#c4bbook-booking-form .c4b-grid-2,
#c4bbook-inline-booking-form .c4b-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 10px;
}

/* Full width fields */
#c4bbook-booking-form .c4b-full,
#c4bbook-inline-booking-form .c4b-full {
    grid-column: 1 / -1;
}

/* Remove extra spacing from the step container */
.c4bbook-inline-step[data-step="4"],
.c4bbook-step[data-step="4"] {
    padding: 0;
}

/* Hide the old inline styles from the form */
.c4bbook-inline-step[data-step="4"] form > div:not(.c4b-grid-2):not(.c4b-field-group),
.c4bbook-step[data-step="4"] form > div:not(.c4b-grid-2):not(.c4b-field-group) {
    margin-top: 0 !important;
}

/* Error state */
#c4bbook-booking-form .c4b-field-group input.error,
#c4bbook-booking-form .c4b-field-group select.error,
#c4bbook-inline-booking-form .c4b-field-group input.error,
#c4bbook-inline-booking-form .c4b-field-group select.error {
    border-color: #ef4444;
    background-color: #fef2f2;
}

#c4bbook-booking-form .c4b-field-group input.error:focus,
#c4bbook-inline-booking-form .c4b-field-group input.error:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* ── Forms ────────────────────────────────────────────────── */
#c4bbook-inline-booking-form input.error,
#c4bbook-booking-form input.error {
    border-color: #ef4444 !important;
    background: #fef2f2;
}

/* ── Navigation Bar & Buttons ─────────────────────────────── */
.c4bbook-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-top: 1px solid var(--c4b-border);
    background: var(--c4b-nav-bg);
}
.c4bbook-btn-secondary {
    padding: 10px 18px;
    background: var(--c4b-bg-alt);
    color: var(--c4b-text);
    border: none;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s ease;
}
.c4bbook-btn-secondary:hover { filter: brightness(0.95); }
.c4bbook-btn-primary {
    padding: 10px 24px;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    margin-left: auto;
    box-shadow: 0 3px 10px rgba(90,21,168,.25);
    transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}
.c4bbook-btn-primary:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 5px 14px rgba(90,21,168,.32); }
.c4bbook-inline-btn-next:disabled,
.c4bbook-btn-next:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }

/* ── Spinner / Loading ────────────────────────────────────── */
.c4bbook-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    gap: 14px;
}
.c4bbook-spinner {
    width: 36px; height: 36px;
    border: 3px solid var(--c4b-bg-alt);
    border-top-color: var(--c4b-color, #5a15a8);
    border-radius: 50%;
    animation: c4b-spin .7s linear infinite;
}
.c4bbook-loading-text {
    margin: 0;
    font-size: 13px;
    color: var(--c4b-text-secondary);
    animation: c4b-pulse 1.4s ease-in-out infinite;
}
@keyframes c4b-pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.4; }
}
@keyframes c4b-spin { to { transform: rotate(360deg); } }

/* ── Step 5: Summary card ──────────────────────────────────── */
.c4bbook-summary-card {
    background: var(--c4b-surface);
    border: 1px solid var(--c4b-border);
    border-radius: 12px;
    padding: 6px 16px;
    box-shadow: 0 2px 8px rgba(17,24,39,.04);
}
.c4bs-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 13px 0;
}
.c4bs-row + .c4bs-row { border-top: 1px solid var(--c4b-border); }
.c4bs-icon {
    flex: 0 0 32px;
    width: 32px; height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
}
.c4bs-icon svg { width: 15px; height: 15px; }
.c4bs-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.c4bs-label {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--c4b-text-muted);
}
.c4bs-value {
    font-size: 14.5px;
    font-weight: 600;
    color: var(--c4b-text);
    line-height: 1.45;
    word-break: break-word;
}
.c4bs-value small { font-weight: 500; color: var(--c4b-text-secondary); font-size: 12.5px; }

.c4bbook-summary-edit-btn {
    margin-top: 14px;
    background: var(--c4b-surface);
    border: 1.5px solid var(--c4b-border-strong);
    color: var(--c4b-text);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color .15s ease, color .15s ease;
}
.c4bbook-summary-edit-btn:hover { border-color: #5a15a8; color: #5a15a8; }

/* ── Step 6: Confirmation ──────────────────────────────────── */
.c4bbook-confirm-wrap { text-align: center; padding: 18px 0 4px; }
.c4bbook-confirm-tick {
    width: 60px; height: 60px;
    margin: 0 auto 16px;
    background: #10b981;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    box-shadow: 0 6px 16px rgba(16,185,129,.3);
}
.c4bbook-confirm-title { text-align: center; margin-bottom: 6px !important; }
.c4bbook-confirm-subtitle { text-align: center; }
.c4bbook-confirm-wrap .c4bbook-summary-card { text-align: left; margin: 14px 0 4px; }
.c4bbook-confirm-btn {
    color: white;
    border: none;
    padding: 11px 26px;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 16px;
    box-shadow: 0 3px 10px rgba(90,21,168,.25);
}
.c4bbook-confirm-countdown {
    color: var(--c4b-text-muted);
    font-size: 11.5px;
    margin: 12px 0 0;
}

/* ── Customer Portal ──────────────────────────────────────── */
.c4b-portal-container {
    max-width: 500px;
    margin: 30px auto;
    background: var(--c4b-bg);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,.1);
    overflow: hidden;
    font-family: 'BT Curve', system-ui, sans-serif;
}
.c4b-portal-header { background: #5a15a8; color: white; padding: 20px 25px; }
.c4b-portal-header h2 { margin: 0; font-size: 20px; color: white; padding-right: 40px; }
.c4b-portal-body { padding: 25px; background: var(--c4b-bg); color: var(--c4b-text); }
.c4b-status {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}
.status-confirmed  { background: #d1fae5; color: #065f46; }
.status-cancelled  { background: #fee2e2; color: #991b1b; }
.c4b-detail-grid {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 10px;
    margin: 15px 0;
    color: var(--c4b-text);
}
.c4b-detail-label { font-weight: 600; color: var(--c4b-text-secondary); }
.c4b-btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    margin-right: 8px;
}
.c4b-btn-primary   { background: #5a15a8; color: white; }
.c4b-btn-danger    { background: #dc2626; color: white; }
.c4b-btn-secondary { background: var(--c4b-bg-alt); color: var(--c4b-text); border: 1px solid var(--c4b-border-strong); }
.c4b-form-group { margin-bottom: 14px; }
.c4b-form-group label { display: block; margin-bottom: 4px; font-weight: 500; font-size: 13px; color: var(--c4b-text); }
.c4b-form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--c4b-border-strong);
    border-radius: 8px;
    font-size: 13px;
    box-sizing: border-box;
    background: var(--c4b-input-bg);
    color: var(--c4b-text);
}
.c4b-modal {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}
.c4b-modal-content {
    background: var(--c4b-surface);
    border-radius: 16px;
    padding: 25px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}
.c4b-modal-content h3 { color: var(--c4b-text); margin-top: 0; }
.c4b-portal-success { background: #d1fae5; color: #065f46; padding: 12px; border-radius: 8px; margin-bottom: 20px; }
.c4b-portal-error   { background: #fee2e2; color: #991b1b; padding: 12px; border-radius: 8px; margin-bottom: 20px; }
.c4b-slot-btn {
    padding: 8px;
    border: 1px solid var(--c4b-border-strong);
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    text-align: center;
    color: var(--c4b-text);
}
.c4b-slot-btn:hover { border-color: #5a15a8; }

/* ── Admin Status Badges ──────────────────────────────────── */
.status-confirmed { background: #d1fae5; color: #065f46; padding: 2px 10px; border-radius: 12px; font-size: 11px; }
.status-cancelled { background: #fee2e2; color: #991b1b; padding: 2px 10px; border-radius: 12px; font-size: 11px; }
.status-completed { background: #dbeafe; color: #1e40af; padding: 2px 10px; border-radius: 12px; font-size: 11px; }

/* ── Responsive: sidebar collapses to a summary strip ─────── */
@media (max-width: 768px) {
    .c4bbook-modal-container { max-height: 90vh; }
    .c4bbook-layout { flex-direction: column; }
    .c4bbook-sidebar {
        width: 100%;
        flex: none;
        border-right: none;
        border-bottom: 1px solid var(--c4b-border);
        padding: 14px 18px;
    }
    .c4bbook-sidebar-title { margin-bottom: 8px; }
    .c4bbook-sidebar-items {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
    }
    .c4bbook-sidebar-item {
        flex-direction: row;
        align-items: center;
        padding: 6px 10px;
        border-radius: 20px;
        gap: 6px;
    }
    .c4bbook-sidebar-icon { width: 20px; height: 20px; flex-basis: 20px; font-size: 11px; }
    .c4bbook-sidebar-text { flex-direction: row; align-items: baseline; gap: 4px; }
    .c4bbook-sidebar-label { display: none; }
    .c4bbook-sidebar-value { font-size: 12px; }
    .c4bbook-sidebar-empty { padding: 8px 10px; font-size: 12px; }

    .c4bbook-modal-body .c4bbook-main,
    .c4bbook-inline-body .c4bbook-main { padding: 18px 18px; }
}

@media (max-width: 600px) {
    .c4b-detail-grid { grid-template-columns: 1fr; gap: 4px; }
    .c4b-detail-label { margin-top: 8px; }
}

/* ── Mobile Service Dropdown (hidden - pills used instead) ─ */
.c4bbook-services-select { display: none; }

/* ── Form input focus ── */
.c4bbook-inline-step input:focus,
.c4bbook-inline-step select:focus,
.c4bbook-inline-step textarea:focus {
    outline: none;
    border-color: #5a15a8 !important;
    box-shadow: 0 0 0 2px rgba(90,21,168,0.12);
}

/* ── Mobile Performance / Readability Optimization ────────── */
@media (max-width: 480px) {
    .c4bbook-modal-body .c4bbook-main,
    .c4bbook-inline-body .c4bbook-main { padding: 14px 16px !important; }

    .c4bbook-service-card {
        padding: 13px !important;
    }
    .c4bbook-service-card h4 {
        font-size: 14px !important;
    }
    .c4bbook-service-card p {
        font-size: 11.5px !important;
        line-height: 1.4 !important;
    }
    .c4bbook-service-duration {
        font-size: 10px !important;
        padding: 2px 8px !important;
    }
    .c4bbook-services-grid {
        gap: 4px !important;
    }

    /* Mobile responsive for Step 4 */
    #c4bbook-booking-form,
    #c4bbook-inline-booking-form {
        gap: 8px;
    }

    #c4bbook-booking-form .c4b-grid-2,
    #c4bbook-inline-booking-form .c4b-grid-2 {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    #c4bbook-booking-form .c4b-field-group input,
    #c4bbook-booking-form .c4b-field-group select,
    #c4bbook-booking-form .c4b-field-group textarea,
    #c4bbook-inline-booking-form .c4b-field-group input,
    #c4bbook-inline-booking-form .c4b-field-group select,
    #c4bbook-inline-booking-form .c4b-field-group textarea {
        padding: 10px 12px;
        font-size: 16px;
    }

    /* Summary card tighter on small screens */
    .c4bbook-summary-card { padding: 4px 14px; }
    .c4bs-row { padding: 11px 0; gap: 10px; }
    .c4bs-value { font-size: 13.5px; }

    .c4bbook-nav { padding: 12px 16px; }
}

/* ── Reduce motion for accessibility ──────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .c4bbook-spinner {
        animation-duration: 1.5s !important;
    }
    .c4bbook-floating-btn {
        transition: none !important;
    }
    .c4bbook-sidebar-item {
        animation: none !important;
    }
}
