/* ============================================================
   Curated Cove Booking - Frontend Styles
   ============================================================ */

:root {
    --ccb-primary:     #1a1a1a;
    --ccb-bg:          #f2f2f2;
    --ccb-accent:      #c8a97e;
    --ccb-btn-bg:      #1a1a1a;
    --ccb-btn-text:    #ffffff;
    --ccb-white:       #ffffff;
    --ccb-border:      #e0e0e0;
    --ccb-text:        #1a1a1a;
    --ccb-muted:       #888;
    --ccb-card-shadow: 0 2px 12px rgba(0,0,0,.07);
    --ccb-radius:      4px;
}

/* ── Wrap ── */
#ccb-booking-wrap {
    background: var(--ccb-bg);
    padding: 30px 20px 100px;
    margin-bottom: 40px;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    color: var(--ccb-text);
    position: relative;
    z-index: 1;
    isolation: isolate;
    box-sizing: border-box;
}
#ccb-booking-wrap *,
#ccb-booking-wrap *::before,
#ccb-booking-wrap *::after {
    box-sizing: border-box;
}

/* ── Progress indicator ── */
.ccb-progress {
    margin-bottom: 30px;
}
.ccb-progress-track {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    max-width: 900px;
    margin: 0 auto;
    position: relative;
}
.ccb-step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
}
.ccb-step-circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #ccc;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    position: relative;
    z-index: 2;
    transition: background .3s;
}
.ccb-step-item.active   .ccb-step-circle,
.ccb-step-item.done     .ccb-step-circle { background: var(--ccb-primary); }
.ccb-step-label {
    font-size: 11px;
    color: #aaa;
    margin-top: 6px;
    text-align: center;
    white-space: nowrap;
    max-width: 100%;
    padding: 0 4px;
}
@media (max-width: 640px) {
    .ccb-step-label {
        white-space: normal;
        font-size: 10px;
        line-height: 1.3;
    }
}
.ccb-step-item.active .ccb-step-label,
.ccb-step-item.done   .ccb-step-label { color: var(--ccb-text); font-weight: 600; }
.ccb-step-line {
    position: absolute;
    top: 19px;
    left: 50%;
    width: 100%;
    height: 1px;
    background: #ccc;
    z-index: 1;
}
.ccb-step-item.done .ccb-step-line { background: var(--ccb-primary); }

/* ── Layout ── */
.ccb-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
    align-items: start;
    padding-bottom: 24px;
}
@media (max-width: 900px) {
    .ccb-layout { grid-template-columns: 1fr; gap: 20px; }
}

/* ── Step panels ── */
.ccb-steps-container {
    position: relative;
    min-width: 0;
}
.ccb-panel {
    display: none;
    background: var(--ccb-white);
    border-radius: var(--ccb-radius);
    padding: 28px 32px 32px;
    box-shadow: var(--ccb-card-shadow);
    min-width: 0;
}
.ccb-panel.active { display: block; }
.ccb-panel-title {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--ccb-text);
    margin: 0 0 16px;
    border: none;
}

/* ── Service Grid ── */
.ccb-services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 28px;
}
@media (max-width: 640px) {
    .ccb-services-grid { grid-template-columns: repeat(2, 1fr); }
    .ccb-option-group { gap: 8px; }
    .ccb-option-circles .ccb-option-btn { width: 42px; height: 42px; font-size: 13px; }
    .ccb-option-pills .ccb-option-btn { padding: 10px 18px; font-size: 13px; flex: 1 1 auto; min-width: 0; }
    #ccb-building-group .ccb-option-btn { flex: 1 1 calc(50% - 8px); }
    .ccb-panel { padding: 20px 16px 24px; }
}
.ccb-service-btn {
    background: var(--ccb-white);
    border: 1px solid var(--ccb-border);
    border-radius: var(--ccb-radius);
    padding: 20px 14px;
    font-size: 13px;
    font-weight: 500;
    color: var(--ccb-text);
    cursor: pointer;
    text-align: center;
    line-height: 1.4;
    transition: all .18s ease;
}
.ccb-service-btn:hover {
    border-color: var(--ccb-primary);
    background: #f9f9f9;
    color: var(--ccb-primary);
}
.ccb-service-btn.selected {
    background: var(--ccb-primary);
    border-color: var(--ccb-primary);
    color: var(--ccb-btn-text);
    font-weight: 700;
}

/* ── Service description & inspection note ── */
.ccb-service-info {
    background: #fafafa;
    border: 1px solid var(--ccb-border);
    border-radius: var(--ccb-radius);
    padding: 16px 18px;
    margin-bottom: 20px;
}
.ccb-service-description {
    font-size: 14px;
    line-height: 1.6;
    color: var(--ccb-text);
    margin: 0 0 12px;
}
.ccb-service-inspection {
    font-size: 13px;
    line-height: 1.5;
    color: var(--ccb-muted);
    margin: 0;
    font-style: italic;
    border-top: 1px solid var(--ccb-border);
    padding-top: 12px;
}
#ccb-step2-service-info {
    margin-bottom: 24px;
}

/* ── Option button groups (hours, pros, materials, building) ── */
.ccb-option-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 4px;
}
.ccb-option-btn {
    background: var(--ccb-white);
    border: 1px solid var(--ccb-border);
    color: var(--ccb-text);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all .18s ease;
    font-family: inherit;
    line-height: 1;
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
}
.ccb-option-circles .ccb-option-btn {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    padding: 0;
    flex-shrink: 0;
}
.ccb-option-pills .ccb-option-btn {
    border-radius: 50px;
    padding: 12px 24px;
    min-height: 44px;
}
.ccb-option-btn:hover {
    border-color: var(--ccb-primary);
}
.ccb-option-btn.selected {
    background: var(--ccb-primary);
    border-color: var(--ccb-primary);
    color: var(--ccb-btn-text);
    font-weight: 700;
}
.ccb-date-month-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--ccb-text);
    margin-bottom: 12px;
    letter-spacing: .3px;
}
.ccb-config-warning {
    color: #856404;
    background: #fff8e6;
    border: 1px solid #ffe08a;
    border-radius: var(--ccb-radius);
    padding: 8px 12px;
    margin-top: 8px;
}

/* ── Radio buttons (legacy) ── */
.ccb-radio-group { display: flex; flex-direction: column; gap: 12px; }
.ccb-radio-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    cursor: pointer;
}
.ccb-radio-label input[type=radio] {
    appearance: none;
    -webkit-appearance: none;
    width: 20px; height: 20px;
    border: 2px solid #bbb;
    border-radius: 50%;
    position: relative;
    cursor: pointer;
    transition: border-color .2s;
    flex-shrink: 0;
}
.ccb-radio-label input[type=radio]:checked {
    border-color: var(--ccb-primary);
}
.ccb-radio-label input[type=radio]:checked::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%,-50%);
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--ccb-primary);
}

/* ── Inputs ── */
.ccb-select, .ccb-textarea, .ccb-input {
    width: 100%;
    border: 1px solid var(--ccb-border);
    border-radius: var(--ccb-radius);
    padding: 11px 14px;
    font-size: 14px;
    color: var(--ccb-text);
    background: var(--ccb-white);
    outline: none;
    transition: border-color .2s;
    box-sizing: border-box;
    font-family: inherit;
}
.ccb-select:focus, .ccb-textarea:focus, .ccb-input:focus { border-color: var(--ccb-primary); }
.ccb-textarea { resize: vertical; min-height: 110px; }
.ccb-note { font-size: 12px; color: var(--ccb-muted); margin-top: 8px; }

/* ── Date scroller ── */
.ccb-date-scroll-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow: hidden;
    width: 100%;
    margin-bottom: 4px;
}
.ccb-date-nav {
    background: none;
    border: 1px solid var(--ccb-border);
    width: 32px; height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ccb-text);
    flex-shrink: 0;
    transition: background .15s;
}
.ccb-date-nav:hover { background: #f0f0f0; }
.ccb-date-scroll {
    display: flex;
    gap: 8px;
    overflow: hidden;
    flex: 1;
    scroll-behavior: smooth;
}
@media (max-width: 640px) {
    .ccb-date-scroll-wrap { gap: 4px; }
    .ccb-date-btn { width: 42px; height: 42px; }
    .ccb-date-btn .ccb-day-num { font-size: 13px; }
}
.ccb-date-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border: 1px solid var(--ccb-border);
    border-radius: 50%;
    font-size: 12px;
    cursor: pointer;
    background: var(--ccb-white);
    color: var(--ccb-text);
    flex-shrink: 0;
    transition: all .15s;
    line-height: 1.2;
}
.ccb-date-btn:hover { border-color: var(--ccb-primary); }
.ccb-date-btn .ccb-day-name { font-size: 9px; text-transform: uppercase; color: var(--ccb-muted); }
.ccb-date-btn .ccb-day-num  { font-size: 14px; font-weight: 600; }
.ccb-date-btn.selected {
    background: var(--ccb-primary);
    border-color: var(--ccb-primary);
    color: #fff;
}
.ccb-date-btn.selected .ccb-day-name { color: rgba(255,255,255,.7); }
.ccb-date-btn.disabled {
    opacity: .35;
    cursor: not-allowed;
    pointer-events: none;
}

/* ── Time slots ── */
#ccb-time-slots-wrap { display: flex; flex-wrap: wrap; gap: 10px; min-height: 46px; }
.ccb-time-btn {
    background: var(--ccb-white);
    border: 1px solid var(--ccb-border);
    border-radius: 50px;
    padding: 9px 20px;
    font-size: 13px;
    cursor: pointer;
    color: var(--ccb-text);
    transition: all .15s;
}
.ccb-time-btn:hover { border-color: var(--ccb-primary); }
.ccb-time-btn.selected {
    background: var(--ccb-primary);
    border-color: var(--ccb-primary);
    color: #fff;
    font-weight: 600;
}
.ccb-error-slot {
    background: #fff0f0;
    border: 1px solid #ffcccc;
    border-radius: var(--ccb-radius);
    padding: 12px 16px;
    color: #c0392b;
    font-size: 13px;
    width: 100%;
}
.ccb-info-msg { color: var(--ccb-muted); font-size: 13px; }

/* ── Step 4 fields ── */
.ccb-field-group { margin-bottom: 18px; }
.ccb-label { display: block; font-size: 12px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase; margin-bottom: 7px; color: #555; }
.ccb-phone-row {
    display: flex;
    align-items: stretch;
    gap: 0;
    width: 100%;
    border: 1px solid var(--ccb-border);
    border-radius: var(--ccb-radius);
    overflow: hidden;
    background: var(--ccb-white);
    transition: border-color .2s;
}
.ccb-phone-row:focus-within {
    border-color: var(--ccb-primary);
}
.ccb-phone-row .ccb-input {
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
}
.ccb-phone-row .ccb-input-small {
    width: 72px;
    min-width: 72px;
    flex-shrink: 0;
    border-right: 1px solid var(--ccb-border);
    text-align: center;
    padding: 11px 8px;
    background: #f8f8f8;
}
.ccb-phone-row .ccb-input:not(.ccb-input-small) {
    flex: 1;
    min-width: 0;
    width: auto;
}
.ccb-input-small { width: 80px; flex-shrink: 0; }
.ccb-otp-row {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}
#ccb-otp-input {
    flex: 1;
    min-width: 140px;
    max-width: 220px;
}
.ccb-verified-badge {
    display: inline-block;
    background: #d1e7dd;
    color: #0f5132;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    margin-top: 8px;
    margin-left: 0;
}

/* ── Stripe card element ── */
.ccb-card-element {
    border: 1px solid var(--ccb-border);
    border-radius: var(--ccb-radius);
    padding: 14px;
    background: var(--ccb-white);
    margin-top: 8px;
}
.ccb-error-msg {
    background: #fff0f0;
    border: 1px solid #ffcccc;
    color: #c0392b;
    padding: 10px 14px;
    border-radius: var(--ccb-radius);
    font-size: 13px;
    margin-top: 8px;
}

/* ── Navigation ── */
.ccb-panel-nav {
    margin-top: 28px;
    padding-top: 4px;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 2;
}
.ccb-nav-right  { justify-content: flex-end; }
.ccb-nav-both   { justify-content: space-between; }

/* ── Buttons ── */
.ccb-btn {
    background: var(--ccb-btn-bg);
    color: var(--ccb-btn-text);
    border: none;
    padding: 12px 32px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .5px;
    cursor: pointer;
    border-radius: var(--ccb-radius);
    transition: opacity .2s;
    text-transform: uppercase;
}
.ccb-btn:hover:not(:disabled) { opacity: .85; }
.ccb-btn:disabled { opacity: .45; cursor: not-allowed; }
.ccb-btn-outline {
    background: transparent;
    color: var(--ccb-btn-bg);
    border: 1px solid var(--ccb-btn-bg);
    padding: 10px 22px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    border-radius: var(--ccb-radius);
    text-transform: uppercase;
    letter-spacing: .5px;
    transition: all .2s;
}
.ccb-btn-outline:hover { background: var(--ccb-btn-bg); color: var(--ccb-btn-text); }
.ccb-btn-sm { padding: 10px 18px; font-size: 12px; }
.ccb-btn-pay { padding: 14px 36px; font-size: 14px; }
.ccb-btn-back {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: var(--ccb-text);
    padding: 4px 8px;
    line-height: 1;
}
.ccb-link-btn {
    background: none;
    border: none;
    color: #0070f3;
    text-decoration: underline;
    cursor: pointer;
    font-size: 13px;
    padding: 0;
}

/* ── Order summary ── */
.ccb-summary {
    background: var(--ccb-white);
    border-radius: var(--ccb-radius);
    box-shadow: var(--ccb-card-shadow);
    padding: 24px;
    position: sticky;
    top: 20px;
    align-self: start;
    height: fit-content;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    min-width: 0;
}
@media (max-width: 900px) {
    .ccb-summary {
        position: static;
        max-height: none;
        overflow-y: visible;
        order: 2;
    }
    .ccb-steps-container { order: 1; }
}
.ccb-summary-section {
    padding: 14px 0;
    border-bottom: 1px solid #f0f0f0;
}
.ccb-summary-section:last-child { border-bottom: none; }
.ccb-summary-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--ccb-text);
    margin-bottom: 10px;
}
.ccb-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 13px;
    margin-bottom: 6px;
    gap: 10px;
}
.ccb-summary-row span:first-child { color: var(--ccb-muted); flex-shrink: 0; }
.ccb-summary-row span:last-child  { text-align: right; }
.ccb-summary-header {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .8px;
    text-transform: uppercase;
    margin-bottom: 0;
}
.ccb-summary-total {
    font-size: 15px;
    font-weight: 800;
    margin-top: 8px;
}
.ccb-summary-total span:first-child { color: var(--ccb-text); }

/* ── OTP Modal ── */
.ccb-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}
.ccb-modal {
    background: var(--ccb-white);
    border-radius: 8px;
    padding: 36px 32px 32px;
    max-width: 440px;
    width: 100%;
    position: relative;
    box-shadow: 0 8px 40px rgba(0,0,0,.2);
    margin: auto;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}
.ccb-modal h3 {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin: 0 0 20px;
}
.ccb-modal-close {
    position: absolute;
    top: 14px; right: 18px;
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: #999;
    line-height: 1;
}
.ccb-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 24px;
    padding-bottom: 4px;
    flex-wrap: wrap;
}
.ccb-modal-actions .ccb-btn,
.ccb-modal-actions .ccb-btn-outline {
    min-width: 100px;
}
.ccb-modal #ccb-modal-otp {
    font-size: 22px;
    letter-spacing: 6px;
    text-align: center;
    width: 100%;
    margin-top: 14px;
    box-sizing: border-box;
}

/* ── Success box ── */
.ccb-success-box {
    text-align: center;
    padding: 40px 20px;
    background: #f0fff4;
    border: 1px solid #b2dfdb;
    border-radius: 8px;
    margin-top: 20px;
}
.ccb-success-icon {
    width: 60px; height: 60px;
    border-radius: 50%;
    background: #2ecc71;
    color: #fff;
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}
.ccb-success-box h3 { font-size: 20px; margin: 0 0 10px; color: #1a1a1a; }
.ccb-success-box p  { color: #555; font-size: 14px; margin: 4px 0; }

/* ── Loading overlay ── */
.ccb-loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,.7);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ccb-spinner {
    width: 40px; height: 40px;
    border: 4px solid #ddd;
    border-top-color: var(--ccb-primary);
    border-radius: 50%;
    animation: ccb-spin .7s linear infinite;
}
@keyframes ccb-spin { to { transform: rotate(360deg); } }

/* ── First Booking Offer Popups ── */
.ccb-offer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 100001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}

.ccb-offer-modal {
    background: var(--ccb-white);
    border-radius: 12px;
    max-width: 460px;
    width: 100%;
    padding: 0 0 32px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    text-align: center;
    overflow: hidden;
    animation: ccb-offer-in 0.35s ease-out;
}

@keyframes ccb-offer-in {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.ccb-offer-accent-bar {
    height: 5px;
    background: linear-gradient(90deg, var(--ccb-primary) 0%, var(--ccb-accent) 50%, var(--ccb-primary) 100%);
}

.ccb-offer-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 26px;
    line-height: 1;
    color: #aaa;
    cursor: pointer;
    z-index: 2;
    padding: 4px;
    transition: color 0.15s;
}

.ccb-offer-close:hover {
    color: var(--ccb-text);
}

.ccb-offer-badge {
    display: inline-block;
    margin: 28px auto 0;
    padding: 10px 22px;
    background: var(--ccb-primary);
    color: var(--ccb-btn-text);
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 1.5px;
    border-radius: 50px;
}

.ccb-offer-badge--applied {
    background: var(--ccb-accent);
    color: #fff;
}

.ccb-offer-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--ccb-accent), #b8956a);
    color: #fff;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px auto 0;
    box-shadow: 0 4px 14px rgba(200, 169, 126, 0.4);
}

.ccb-offer-modal--success .ccb-offer-badge {
    margin-top: 12px;
}

.ccb-offer-title {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--ccb-text);
    margin: 18px 28px 0;
    letter-spacing: -0.2px;
}

.ccb-offer-sub {
    font-size: 14px;
    color: var(--ccb-muted);
    margin: 12px 28px 0;
    line-height: 1.5;
}

.ccb-offer-cta {
    margin-top: 24px;
    min-width: 180px;
    padding: 14px 32px !important;
    font-size: 14px !important;
    letter-spacing: 0.5px;
}

.ccb-summary-discount span:last-child {
    color: #2e7d32;
    font-weight: 600;
}

.ccb-discount-value {
    color: #2e7d32 !important;
}
