/* ============================================================
   ConsultBook Pro – Frontend Booking Styles
   Design: matches Adl Advisory color palette
   Primary:  #1a3a4a  (dark teal/navy — header & accents)
   Green:    #2e7d52  (logo green — selected states & CTAs)
   Gold:     #c9a84c  (warm gold — price & highlights)
   ============================================================ */

:root {
    --cbp-primary:      #1a3a4a;   /* dark teal – main buttons, active steps */
    --cbp-primary-hover:#142e3a;
    --cbp-green:        #2e7d52;   /* logo green – selected, success */
    --cbp-green-light:  #eaf5ee;
    --cbp-gold:         #c9a84c;   /* warm gold – price labels */
    --cbp-text:         #1a2e38;
    --cbp-muted:        #6b7e86;
    --cbp-border:       #dde4e8;
    --cbp-border-light: #eef2f5;
    --cbp-bg:           #f5f8fa;
    --cbp-white:        #ffffff;
    --cbp-success:      #2e7d52;
    --cbp-error:        #c0392b;
    --cbp-r:            10px;
    --cbp-shadow:       0 2px 12px rgba(26,58,74,.08);
    --cbp-shadow-lg:    0 8px 32px rgba(26,58,74,.12);
}

.cbp-booking-wrap *,
.cbp-booking-wrap *::before,
.cbp-booking-wrap *::after { box-sizing: border-box; }

.cbp-booking-wrap {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    max-width: 760px;
    margin: 36px auto;
    color: var(--cbp-text);
}

/* ── Page title ── */
.cbp-booking-wrap > h2 {
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    color: var(--cbp-primary);
    margin: 0 0 32px;
    letter-spacing: -.02em;
}

/* ── Progress stepper ── */
.cbp-progress {
    display: flex;
    justify-content: space-between;
    margin-bottom: 36px;
    position: relative;
    padding: 0 16px;
}
.cbp-progress::before {
    content: '';
    position: absolute;
    top: 15px; left: 16px; right: 16px;
    height: 2px;
    background: var(--cbp-border);
    z-index: 0;
}
.cbp-progress-track {
    position: absolute;
    top: 15px; left: 16px;
    height: 2px;
    background: var(--cbp-primary);
    z-index: 1;
    transition: width .45s cubic-bezier(.4,0,.2,1);
}
.cbp-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    position: relative;
    z-index: 2;
}
.cbp-step-num {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--cbp-white);
    border: 2px solid var(--cbp-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: var(--cbp-muted);
    transition: all .3s;
}
.cbp-step-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--cbp-muted);
    text-align: center;
    letter-spacing: .03em;
    text-transform: uppercase;
    transition: color .3s;
}
.cbp-step.active .cbp-step-num {
    background: var(--cbp-primary);
    border-color: var(--cbp-primary);
    color: #fff;
    box-shadow: 0 0 0 4px rgba(26,58,74,.15);
}
.cbp-step.active .cbp-step-label { color: var(--cbp-primary); }
.cbp-step.done .cbp-step-num {
    background: var(--cbp-green);
    border-color: var(--cbp-green);
    color: #fff;
}
.cbp-step.done .cbp-step-label { color: var(--cbp-green); }

/* ── Panel ── */
.cbp-panel {
    background: var(--cbp-white);
    border: 1px solid var(--cbp-border);
    border-radius: 14px;
    padding: 32px;
    box-shadow: var(--cbp-shadow);
}
.cbp-panel h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--cbp-primary);
    margin: 0 0 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--cbp-border-light);
    letter-spacing: -.01em;
}

/* ── Service cards (inside booking form step 1) ── */
.cbp-service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}
.cbp-service-card {
    border: 2px solid var(--cbp-border);
    border-radius: 14px;
    padding: 22px 20px 20px;
    cursor: pointer;
    transition: all .25s ease;
    position: relative;
    overflow: hidden;
    background: var(--cbp-white);
    display: flex;
    flex-direction: column;
}
/* Icon area */
.cbp-service-card .sc-icon {
    width: 44px; height: 44px;
    border-radius: 10px;
    background: #f0f5f8;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 14px;
    transition: background .25s;
    flex-shrink: 0;
}
.cbp-service-card .sc-icon svg {
    width: 22px; height: 22px;
    stroke: var(--cbp-primary);
    transition: stroke .25s;
}
.cbp-service-card .sc-name {
    font-weight: 700;
    font-size: 16px;
    color: var(--cbp-primary);
    margin-bottom: 6px;
    line-height: 1.3;
    transition: color .25s;
}
.cbp-service-card .sc-description {
    font-size: 12px;
    color: var(--cbp-muted);
    margin: 2px 0 8px;
    line-height: 1.5;
    transition: color .25s;
}
.cbp-service-card .sc-description del {
    opacity: .6;
    text-decoration: line-through;
}
.cbp-service-card:hover .sc-description,
.cbp-service-card.selected .sc-description { color: rgba(255,255,255,.75); }

.cbp-service-card .sc-duration {
    display: flex;
    align-items: center;
    gap: 4px;
    transition: color .25s;
    flex-grow: 1;
}
.cbp-service-card .sc-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--cbp-gold);
    letter-spacing: -.01em;
    transition: color .25s;
}
/* Hover — dark card */
.cbp-service-card:hover {
    background: var(--cbp-primary);
    border-color: var(--cbp-primary);
    box-shadow: 0 8px 28px rgba(26,58,74,.25);
    transform: translateY(-3px);
}
.cbp-service-card:hover .sc-icon {
    background: rgba(255,255,255,.15);
}
.cbp-service-card:hover .sc-icon svg { stroke: #fff; }
.cbp-service-card:hover .sc-name    { color: #fff; }
.cbp-service-card:hover .sc-duration{ color: rgba(255,255,255,.75); }
.cbp-service-card:hover .sc-price   { color: var(--cbp-gold); }
/* Selected — same dark style */
.cbp-service-card.selected {
    background: var(--cbp-primary);
    border-color: var(--cbp-primary);
    box-shadow: 0 8px 28px rgba(26,58,74,.25);
}
.cbp-service-card.selected .sc-icon            { background: rgba(255,255,255,.15); }
.cbp-service-card.selected .sc-icon svg        { stroke: #fff; }
.cbp-service-card.selected .sc-name            { color: #fff; }
.cbp-service-card.selected .sc-duration        { color: rgba(255,255,255,.75); }
.cbp-service-card.selected .sc-price           { color: var(--cbp-gold); }

/* ── Staff cards ── */
.cbp-staff-list { display: flex; gap: 14px; flex-wrap: wrap; }
.cbp-staff-card {
    border: 2px solid var(--cbp-border);
    border-radius: var(--cbp-r);
    padding: 14px 18px;
    cursor: pointer;
    transition: all .2s;
    display: flex;
    align-items: center;
    gap: 13px;
    background: var(--cbp-white);
    min-width: 200px;
}
.cbp-staff-card:hover    { border-color: var(--cbp-primary); box-shadow: var(--cbp-shadow); }
.cbp-staff-card.selected { border-color: var(--cbp-green); background: var(--cbp-green-light); }
.cbp-staff-avatar {
    width: 42px; height: 42px;
    border-radius: 50%;
    background: var(--cbp-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
    letter-spacing: 0;
}
.cbp-staff-card.selected .cbp-staff-avatar { background: var(--cbp-green); }
.cbp-staff-name  { font-weight: 700; font-size: 14px; color: var(--cbp-primary); }
.cbp-staff-bio   { font-size: 12px; color: var(--cbp-muted); margin-top: 2px; }

/* ── Date picker ── */
.cbp-date-section { margin-bottom: 24px; }
.cbp-date-section label {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--cbp-muted);
    display: block;
    margin-bottom: 8px;
}
.cbp-date-input {
    border: 2px solid var(--cbp-border);
    border-radius: var(--cbp-r);
    padding: 11px 14px;
    font-size: 14px;
    width: 240px;
    color: var(--cbp-text);
    font-family: inherit;
    transition: border-color .2s, box-shadow .2s;
    background: var(--cbp-white);
}
.cbp-date-input:focus {
    border-color: var(--cbp-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(26,58,74,.1);
}

/* ── Time slots ── */
.cbp-booking-wrap .cbp-slots { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }

.cbp-booking-wrap .cbp-slot {
    display: inline-flex;
    align-items: center;
    border: 1.5px solid #2e7d52 !important;
    border-radius: 50px;
    padding: 9px 18px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    transition: all .17s ease;
    color: #2e7d52 !important;
    background: #ffffff !important;
    outline: none;
    white-space: nowrap;
    letter-spacing: .01em;
    box-shadow: none;
}
.cbp-booking-wrap .cbp-slot:hover {
    background: #2e7d52 !important;
    color: #ffffff !important;
    border-color: #2e7d52 !important;
    box-shadow: 0 3px 10px rgba(46,125,82,.2);
}
.cbp-booking-wrap .cbp-slot.selected {
    background: #2e7d52 !important;
    border-color: #2e7d52 !important;
    color: #ffffff !important;
    box-shadow: 0 3px 12px rgba(46,125,82,.28);
}

.cbp-booking-wrap .cbp-slots-empty { color: var(--cbp-muted); font-size: 14px; padding: 14px 0; }

/* ── Client details form ── */
.cbp-field-group { margin-bottom: 18px; }
.cbp-field-group label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--cbp-muted);
    margin-bottom: 7px;
}
.cbp-field-group input,
.cbp-field-group textarea {
    width: 100%;
    border: 2px solid var(--cbp-border);
    border-radius: var(--cbp-r);
    padding: 11px 14px;
    font-size: 14px;
    color: var(--cbp-text);
    font-family: inherit;
    transition: border-color .2s, box-shadow .2s;
    background: var(--cbp-white);
}
.cbp-field-group input:focus,
.cbp-field-group textarea:focus {
    border-color: var(--cbp-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(26,58,74,.08);
}
.cbp-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ── Payment tabs ── */
.cbp-payment-section { margin-top: 24px; }
.cbp-payment-tabs    { display: flex; gap: 12px; margin-bottom: 20px; }
.cbp-payment-tab {
    border: 2px solid var(--cbp-border);
    border-radius: var(--cbp-r);
    padding: 12px 20px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all .2s;
    background: var(--cbp-white);
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--cbp-muted);
}
.cbp-payment-tab:hover  { border-color: var(--cbp-primary); color: var(--cbp-primary); }
.cbp-payment-tab.active {
    border-color: var(--cbp-primary);
    background: #f0f5f8;
    color: var(--cbp-primary);
}
.cbp-payment-tab svg { width: 20px; height: 20px; }
#cbp-stripe-element {
    border: 2px solid var(--cbp-border);
    border-radius: var(--cbp-r);
    padding: 13px 14px;
    margin-bottom: 16px;
    transition: border-color .2s;
    background: var(--cbp-white);
}
#cbp-stripe-element.focused { border-color: var(--cbp-primary); }

/* ── Summary box ── */
.cbp-summary {
    background: #f0f5f8;
    border: 1px solid var(--cbp-border);
    border-left: 4px solid var(--cbp-primary);
    border-radius: 0 var(--cbp-r) var(--cbp-r) 0;
    padding: 18px 20px;
    margin-bottom: 24px;
}
.cbp-summary h4 {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--cbp-primary);
    font-weight: 700;
    margin: 0 0 12px;
}
.cbp-summary-row { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 7px; color: var(--cbp-text); }
.cbp-summary-row.total {
    font-weight: 700;
    font-size: 16px;
    color: var(--cbp-primary);
    border-top: 1px solid var(--cbp-border);
    padding-top: 10px;
    margin-top: 6px;
}
.cbp-summary-row.total span:last-child { color: var(--cbp-gold); }

/* ── Navigation buttons ── */
.cbp-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 28px; }
.cbp-btn-back {
    background: none;
    border: 2px solid var(--cbp-border);
    color: var(--cbp-muted);
    padding: 11px 24px;
    border-radius: var(--cbp-r);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
    font-family: inherit;
}
.cbp-btn-back:hover { border-color: var(--cbp-primary); color: var(--cbp-primary); }
.cbp-btn-next, .cbp-btn-book {
    background: var(--cbp-primary);
    color: #fff;
    border: none;
    padding: 13px 32px;
    border-radius: var(--cbp-r);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s, transform .15s, box-shadow .2s;
    font-family: inherit;
    letter-spacing: .02em;
    box-shadow: 0 3px 12px rgba(26,58,74,.25);
}
.cbp-btn-next:hover, .cbp-btn-book:hover {
    background: var(--cbp-primary-hover);
    box-shadow: 0 5px 18px rgba(26,58,74,.35);
    transform: translateY(-1px);
}
.cbp-btn-next:disabled, .cbp-btn-book:disabled {
    opacity: .55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ── Spinner ── */
.cbp-spinner {
    display: inline-block;
    width: 16px; height: 16px;
    border: 2px solid rgba(255,255,255,.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: cbp-spin .65s linear infinite;
    vertical-align: middle;
    margin-right: 7px;
}
@keyframes cbp-spin { to { transform: rotate(360deg); } }

/* ── Success screen ── */
.cbp-success { text-align: center; padding: 48px 24px; }
.cbp-success-icon {
    width: 76px; height: 76px;
    background: var(--cbp-green-light);
    border: 3px solid var(--cbp-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-size: 36px;
}
.cbp-success h2 {
    font-size: 26px;
    font-weight: 700;
    color: var(--cbp-primary);
    margin: 0 0 10px;
    letter-spacing: -.02em;
}
.cbp-success p  { color: var(--cbp-muted); margin-bottom: 28px; font-size: 15px; }
.cbp-success-details {
    background: #f0f5f8;
    border: 1px solid var(--cbp-border);
    border-radius: var(--cbp-r);
    padding: 20px 24px;
    text-align: left;
    max-width: 380px;
    margin: 0 auto 28px;
}
.cbp-success-details .row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    padding: 8px 0;
    border-bottom: 1px solid var(--cbp-border-light);
    color: var(--cbp-text);
}
.cbp-success-details .row:last-child { border: none; }
.cbp-success-details .row span:first-child { color: var(--cbp-muted); }
.cbp-success-details .row strong { color: var(--cbp-primary); }

/* ── Error ── */
.cbp-error {
    background: #fdf0ef;
    border: 1px solid #f5c6c2;
    border-left: 4px solid var(--cbp-error);
    color: var(--cbp-error);
    padding: 12px 16px;
    border-radius: 0 8px 8px 0;
    font-size: 13px;
    margin-top: 12px;
    display: none;
}

/* ── Services grid page (shortcode) ── */
.cbp-services-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 24px; }

/* Service card — all colors driven by CSS variables set from admin settings */
.cbp-service-block {
    background: var(--cbp-sc-bg, #fff);
    border: 1px solid var(--cbp-sc-border, #dde4e8);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,.07);
    transition: background var(--cbp-sc-transition, .3s),
                border-color var(--cbp-sc-transition, .3s),
                box-shadow var(--cbp-sc-transition, .3s),
                transform var(--cbp-sc-transition, .3s);
    cursor: default;
}
.cbp-service-block:hover {
    background: var(--cbp-sc-hover-bg, #1a3a4a);
    border-color: var(--cbp-sc-hover-bg, #1a3a4a);
    box-shadow: 0 8px 32px rgba(0,0,0,.15);
    transform: translateY(-4px);
}

.cbp-service-block-body { padding: 28px 24px 24px; display: flex; flex-direction: column; height: calc(100% - 0px); min-height: 220px; }

/* Icon wrapper */
.cbp-sc-icon-wrap {
    width: 52px; height: 52px;
    border-radius: 12px;
    background: rgba(0,0,0,.05);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    transition: background var(--cbp-sc-transition, .3s);
    overflow: hidden;
    flex-shrink: 0;
}
.cbp-service-block:hover .cbp-sc-icon-wrap {
    background: rgba(255,255,255,.15);
}
.cbp-sc-icon-svg {
    width: 28px; height: 28px;
    color: var(--cbp-sc-icon, #1a3a4a);
    transition: color var(--cbp-sc-transition, .3s);
}
.cbp-service-block:hover .cbp-sc-icon-svg {
    color: var(--cbp-sc-hover-icon, #fff);
}
.cbp-sc-icon-img {
    width: 100%; height: 100%;
    object-fit: contain;
    transition: filter var(--cbp-sc-transition, .3s);
}
.cbp-service-block:hover .cbp-sc-icon-img {
    filter: brightness(0) invert(1);  /* makes dark icons white on hover */
}

/* Title */
.cbp-sc-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--cbp-sc-text, #1a2e38);
    margin: 0 0 8px;
    line-height: 1.25;
    letter-spacing: -.01em;
    transition: color var(--cbp-sc-transition, .3s);
}
.cbp-service-block:hover .cbp-sc-title {
    color: var(--cbp-sc-hover-text, #fff);
}

/* Description */
.cbp-sc-desc {
    font-size: 13px;
    line-height: 1.65;
    margin: 0 0 20px;
    color: color-mix(in srgb, var(--cbp-sc-text, #1a2e38) 70%, transparent);
    transition: color var(--cbp-sc-transition, .3s);
    flex-grow: 1;
}
.cbp-sc-desc p { margin: 0 0 8px; }
.cbp-sc-desc p:last-child { margin-bottom: 0; }
.cbp-sc-desc ul, .cbp-sc-desc ol { padding-left: 18px; margin: 0 0 8px; }
.cbp-sc-desc li { margin-bottom: 3px; }
.cbp-sc-desc strong, .cbp-sc-desc b { font-weight: 700; }
.cbp-sc-desc s, .cbp-sc-desc del { text-decoration: line-through; }
.cbp-service-block:hover .cbp-sc-desc {
    color: color-mix(in srgb, var(--cbp-sc-hover-text, #fff) 80%, transparent);
}
.cbp-service-block:hover .cbp-sc-desc a { color: inherit; }

/* Price — stacked above button, full width */
.cbp-sc-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--cbp-sc-price, #c9a84c);
    transition: color var(--cbp-sc-transition, .3s);
    letter-spacing: -.01em;
    margin-bottom: 14px;
    margin-top: auto;
    padding-top: 8px;
}
.cbp-service-block:hover .cbp-sc-price {
    color: color-mix(in srgb, var(--cbp-sc-hover-text, #fff) 90%, var(--cbp-sc-price, #c9a84c));
}

/* Button — full width, below price */
.cbp-sc-btn {
    background: var(--cbp-sc-btn-bg, #1a3a4a);
    color: var(--cbp-sc-btn-text, #fff);
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    display: block;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
    letter-spacing: .02em;
    border: none;
    cursor: pointer;
    transition:
        background var(--cbp-sc-transition, .3s),
        color var(--cbp-sc-transition, .3s),
        box-shadow var(--cbp-sc-transition, .3s),
        transform var(--cbp-sc-transition, .3s);
}
.cbp-sc-btn:hover,
.cbp-service-block:hover .cbp-sc-btn {
    background: var(--cbp-sc-hover-btn-bg, #c9a84c);
    color: var(--cbp-sc-hover-btn-tx, #fff);
    box-shadow: 0 4px 14px rgba(0,0,0,.2);
    transform: translateY(-1px);
    text-decoration: none;
}

/* ── My bookings ── */
.cbp-my-bookings { width: 100%; border-collapse: collapse; font-size: 14px; }
.cbp-my-bookings th {
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--cbp-muted);
    padding: 10px 14px;
    border-bottom: 2px solid var(--cbp-primary);
}
.cbp-my-bookings td { padding: 13px 14px; border-bottom: 1px solid var(--cbp-border-light); }
.cbp-my-bookings tr:hover td { background: #f5f8fa; }

/* ── Responsive ── */
@media (max-width: 640px) {
    .cbp-panel { padding: 20px 16px; }
    .cbp-field-row { grid-template-columns: 1fr; }
    .cbp-service-grid { grid-template-columns: 1fr; }
    .cbp-progress::before, .cbp-progress-track { display: none; }
    .cbp-step-label { display: none; }
    .cbp-date-input { width: 100%; }
    .cbp-tz-select { width: 100%; }
    .cbp-booking-wrap { margin: 20px 12px; }
    .cbp-btn-next, .cbp-btn-book { padding: 13px 24px; }
}

/* ── Form title ── */
.cbp-form-title {
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    color: var(--cbp-primary);
    margin: 0 0 32px;
    letter-spacing: -.02em;
    position: relative;
    padding-bottom: 16px;
}
.cbp-form-title::after {
    content: '';
    position: absolute;
    bottom: 0; left: 50%;
    transform: translateX(-50%);
    width: 48px; height: 3px;
    background: var(--cbp-gold);
    border-radius: 2px;
}

/* ── Timezone Native Select ── */
.cbp-tz-select {
    width: 380px;
    max-width: 100%;
    cursor: pointer;
    appearance: auto;
}
