/* ============================================================
   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 ── */
.cbp-service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 16px;
}
.cbp-service-card {
    border: 2px solid var(--cbp-border);
    border-radius: var(--cbp-r);
    padding: 20px 18px 18px;
    cursor: pointer;
    transition: all .22s ease;
    position: relative;
    overflow: hidden;
    background: var(--cbp-white);
}
.cbp-service-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 4px; height: 100%;
    background: var(--cbp-color, var(--cbp-primary));
    transition: width .2s;
}
.cbp-service-card:hover {
    border-color: var(--cbp-primary);
    box-shadow: var(--cbp-shadow-lg);
    transform: translateY(-3px);
}
.cbp-service-card.selected {
    border-color: var(--cbp-primary);
    background: #f0f5f8;
}
.cbp-service-card.selected::before { background: var(--cbp-green); width: 5px; }
.cbp-service-card .sc-name {
    font-weight: 700;
    font-size: 15px;
    color: var(--cbp-primary);
    margin-bottom: 5px;
    line-height: 1.3;
}
.cbp-service-card .sc-duration {
    font-size: 12px;
    color: var(--cbp-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}
.cbp-service-card .sc-duration::before {
    content: '';
    display: inline-block;
    width: 10px; height: 10px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7e86' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 6v6l4 2'/%3E%3C/svg%3E") center/contain no-repeat;
}
.cbp-service-card .sc-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--cbp-gold);
    margin-top: 14px;
    letter-spacing: -.01em;
}

/* ── 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-slots { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.cbp-slot {
    border: 2px solid var(--cbp-border);
    border-radius: 8px;
    padding: 10px 18px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all .18s;
    color: var(--cbp-text);
    background: var(--cbp-white);
    letter-spacing: .01em;
}
.cbp-slot:hover {
    border-color: var(--cbp-primary);
    color: var(--cbp-primary);
    background: #f0f5f8;
}
.cbp-slot.selected {
    background: var(--cbp-primary);
    color: #fff;
    border-color: var(--cbp-primary);
    box-shadow: 0 2px 8px rgba(26,58,74,.25);
}
.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: 20px; }
.cbp-service-block {
    background: var(--cbp-white);
    border: 1px solid var(--cbp-border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--cbp-shadow);
    transition: box-shadow .2s, transform .2s;
}
.cbp-service-block:hover { box-shadow: var(--cbp-shadow-lg); transform: translateY(-3px); }
.cbp-service-block-header { height: 6px; background: var(--cbp-primary); }
.cbp-service-block-body   { padding: 22px; }
.cbp-service-block h3 { margin: 0 0 6px; font-size: 16px; color: var(--cbp-primary); font-weight: 700; }
.cbp-service-block p  { font-size: 13px; color: var(--cbp-muted); margin: 0 0 18px; line-height: 1.6; }
.cbp-service-block .meta { display: flex; justify-content: space-between; align-items: center; }
.cbp-service-block .price { font-weight: 700; font-size: 17px; color: var(--cbp-gold); }
.cbp-book-link {
    background: var(--cbp-primary);
    color: #fff;
    padding: 9px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background .2s, box-shadow .2s;
}
.cbp-book-link:hover { background: var(--cbp-primary-hover); color: #fff; box-shadow: 0 3px 10px rgba(26,58,74,.25); }

/* ── 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-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;
}
