/**
 * Concrete Calculator Wizard Styles
 * Builds on top of calculator-base.css (loaded first).
 */

/* ── Token bridge: map shared design system tokens to concrete's orange palette ── */
.silva-calculator-container[data-calculator-type="concrete"] {
    --calc-primary:           #f97316;
    --calc-primary-dark:      #ea580c;
    --calc-primary-light:     #fff7ed;
    --calc-total-gradient:    linear-gradient(135deg, #f97316, #ea580c);
    --calc-accent:            #fb923c;
}

/* ── Iframe mode: hide site chrome so only the wizard shows ──────────────── */
@media (max-width: 768px) {
    body:has(.silva-calculator-container) #masthead,
    body:has(.silva-calculator-container) #site-header {
        display: none !important;
    }
    body:has(.silva-calculator-container) #wpadminbar {
        display: none !important;
    }
    body.admin-bar:has(.silva-calculator-container) {
        margin-top: 0 !important;
    }
    /* Scroll content behind sticky nav bar */
    body:has(.silva-calculator-container) {
        padding-top: 0 !important;
    }
}

/* ── Hide WordPress page title when calculator is present ───────────────── */
body:has(.concrete-wizard-root) .entry-header,
body:has(.concrete-wizard-root) .entry-header * {
    display: none !important;
}

/* ── Strip shared base card chrome — concrete wizard is full-bleed ───────── */
.concrete-wizard-root.silva-calculator-container {
    margin: 0 !important;
    padding: 0 !important;
    max-width: 100% !important;
}

/* ── Compact calculator header — title only, no redundant description ─────── */
.concrete-wizard-root .silva-calculator-header {
    margin-bottom: 8px;
}
.concrete-wizard-root .silva-calculator-header h2 {
    font-size: 16px;
    font-weight: 600;
    color: #6b7280;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin: 0;
}
.concrete-wizard-root .silva-calculator-header p {
    display: none;
}

/* ── Step layout ──────────────────────────────────────────────────────────── */
.concrete-wizard-root .calculator-step {
    display: none;
}
.concrete-wizard-root .calculator-step.active {
    display: block;
}
.concrete-wizard-root .step-title {
    font-size: 22px;
    font-weight: 800;
    color: #111827;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
    line-height: 1.2;
}
.concrete-wizard-root .step-title-icon {
    font-size: 26px;
    flex-shrink: 0;
}
.concrete-wizard-root .step-subtitle {
    color: #6b7280;
    font-size: 15px;
    margin-bottom: 28px;
    margin-top: 4px;
    line-height: 1.4;
}

/* ── Step dots ────────────────────────────────────────────────────────────── */
.concrete-step-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin: 14px 0 24px;
}
.step-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #e5e7eb;
    cursor: default;
    transition: background 0.2s, transform 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: #9ca3af;
    flex-shrink: 0;
}
.step-dot.active {
    background: #f97316;
    color: #fff;
    transform: scale(1.15);
}
.step-dot.completed {
    background: #10b981;
    color: #fff;
    cursor: pointer;
}
.step-dot.completed:hover {
    background: #059669;
    transform: scale(1.1);
}

/* ── Area type tiles (replaces <select>) ──────────────────────────────────── */
.area-type-tiles-wrap {
    position: relative;
    margin-bottom: 0;
}
.area-type-tiles {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-bottom: 0;
}
.area-type-tile--more {
    border-style: dashed;
    color: #6b7280;
}
.area-type-tile--more .area-type-tile-icon {
    font-size: 16px;
    letter-spacing: 2px;
    line-height: 1;
}
.area-type-tile--more.active {
    border-color: #f97316;
    border-style: solid;
    background: #fff7ed;
}
.area-type-tile--more.active .area-type-tile-label {
    color: #c2410c;
}
/* More popover */
.area-more-popover {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 260px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.14);
    padding: 12px;
    z-index: 50;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
}
.area-more-popover.open {
    display: grid;
}
.area-type-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 14px 8px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    text-align: center;
    -webkit-tap-highlight-color: transparent;
    min-height: 72px;
}
.area-type-tile.selected {
    border-color: #f97316;
    background: #fff7ed;
}
.area-type-tile-icon { font-size: 22px; line-height: 1; }
.area-type-tile-label {
    font-size: 11px;
    font-weight: 600;
    color: #374151;
    white-space: nowrap;
}
.area-type-tile.selected .area-type-tile-label { color: #c2410c; }

/* ── Area entry card ──────────────────────────────────────────────────────── */
.concrete-area-entry {
    background: transparent;
    border: none;
    padding: 0;
    margin-bottom: 0;
}
.form-row-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}
.area-dims-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 8px;
}
/* Shown/hidden by JS after tile selection */
.area-dims-section {
    margin-top: 12px;
}
.dims-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px 16px 12px;
}
.sqft-badge-row {
    margin-bottom: 12px;
}
/* Dimension inputs — large tap targets */
.area-dims-row .form-row label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #374151;
    margin-bottom: 6px;
}
.area-dims-row .form-row input[type="number"] {
    width: 100%;
    box-sizing: border-box;
    height: 56px;
    font-size: 22px;
    font-weight: 700;
    color: #111827;
    text-align: center;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    padding: 0 12px;
    transition: border-color 0.15s;
    -moz-appearance: textfield;
}
.area-dims-row .form-row input[type="number"]::-webkit-inner-spin-button,
.area-dims-row .form-row input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; }
.area-dims-row .form-row input[type="number"]:focus {
    outline: none;
    border-color: #f97316;
    box-shadow: 0 0 0 3px rgba(249,115,22,0.12);
}
#add-area-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 18px;
    font-size: 15px;
    font-weight: 700;
    border-radius: 10px;
    height: 48px;
    flex-shrink: 0;
    white-space: nowrap;
    box-sizing: border-box;
}
/* Badge + button on one row */
.dims-action-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    margin-bottom: 4px;
}
.dims-action-row .sqft-badge {
    flex: 1;
    height: 48px;
    font-size: 16px;
    margin: 0;
}
/* Inline continue button — Step 1 */
.step1-continue-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
    min-height: 56px;
    font-size: 17px;
    font-weight: 700;
    border-radius: 10px;
    margin-top: 12px;
    letter-spacing: 0.01em;
}
/* Sqft badge — inline strip below dims */
.sqft-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 10px;
    color: #c2410c;
    font-weight: 800;
    font-size: 18px;
    height: 48px;
    width: 100%;
    box-sizing: border-box;
    padding: 0 16px;
    transition: background 0.2s;
}
.sqft-badge::before {
    content: 'Area: ';
    font-weight: 500;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #ea580c;
    opacity: 0.75;
}
.computed-sqft {
    height: 40px;
    line-height: 40px;
    font-weight: 700;
    color: #f97316;
    font-size: 15px;
}
.concrete-areas-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

/* ── Area card ────────────────────────────────────────────────────────────── */
.area-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px 14px;
}
.area-card-info {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}
.area-card-type {
    font-weight: 600;
    color: #1f2937;
    font-size: 14px;
}
.area-card-name {
    color: #6b7280;
    font-size: 13px;
}
.area-card-sqft {
    font-weight: 700;
    color: #f97316;
    font-size: 14px;
}
.area-card-remove {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    font-size: 14px;
    padding: 4px 6px;
    border-radius: 4px;
    transition: color 0.2s, background 0.2s;
}
.area-card-remove:hover { color: #ef4444; background: #fef2f2; }

/* ── Running total ────────────────────────────────────────────────────────── */
.concrete-running-total {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 8px;
    padding: 10px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 15px;
    margin-top: 4px;
}
.concrete-running-total .total-label { color: #92400e; }
.concrete-running-total .total-value { font-weight: 700; color: #f97316; }

/* ── Option cards grid ────────────────────────────────────────────────────── */
.option-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}
.option-card {
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 18px 14px;
    cursor: pointer;
    transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 64px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    -webkit-tap-highlight-color: transparent;
}
.option-card:active { transform: scale(0.97); }
.option-card:hover { border-color: #f97316; }
.option-card input[type="radio"],
.option-card input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.option-card.selected {
    border-color: #f97316;
    border-width: 2.5px;
    background: #fff7ed;
    box-shadow: 0 0 0 3px rgba(249,115,22,0.15);
}
.option-card--highlight {
    border-color: #fed7aa;
    background: linear-gradient(135deg, #fff7ed 0%, #fff 100%);
}
.option-card--highlight.selected {
    border-color: #f97316;
    background: linear-gradient(135deg, #fff7ed 0%, #fff 100%);
}
.option-card-icon { font-size: 26px; margin-bottom: 2px; }
.option-card-title { font-weight: 700; font-size: 14px; color: #1f2937; margin-bottom: 2px; }
.option-card-desc { font-size: 12px; color: #6b7280; margin-bottom: 2px; line-height: 1.3; }
.option-card-price { font-weight: 700; font-size: 13px; color: #f97316; }

/* ── Sub-sections ─────────────────────────────────────────────────────────── */
.sub-section { margin-top: 24px; padding-top: 20px; border-top: 1px solid #e5e7eb; }
.sub-section h4, .form-section h4 { font-size: 16px; font-weight: 700; color: #1f2937; margin-bottom: 14px; }
.form-section { margin-bottom: 28px; }
.section-hint { font-size: 13px; color: #9ca3af; margin-bottom: 12px; line-height: 1.4; }

/* ── Warning / info banners ──────────────────────────────────────────────── */
.warning-banner {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 13px;
    color: #92400e;
    margin-top: 12px;
}
.btn-link {
    background: none;
    border: none;
    color: #f97316;
    cursor: pointer;
    text-decoration: underline;
    padding: 0 4px;
    font-size: 13px;
}
.info-banner {
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 13px;
    margin-bottom: 16px;
}
.info-banner--minimum {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}
.error-banner {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 12px 14px;
    color: #b91c1c;
    font-size: 13px;
    margin-bottom: 12px;
}
.success-banner {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    color: #166534;
}
.success-banner h4 { margin-bottom: 6px; font-size: 18px; }

/* ── Upsell card (heated driveway) ───────────────────────────────────────── */
.upsell-card {
    background: linear-gradient(135deg, #fff7ed 0%, #fff 100%);
    border: 2px solid #fed7aa;
    border-radius: 12px;
    padding: 16px;
}
.upsell-card-content {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}
.upsell-card-icon { font-size: 28px; }
.upsell-card-title { font-weight: 700; color: #1f2937; font-size: 15px; margin-bottom: 3px; }
.upsell-card-desc { font-size: 12px; color: #6b7280; }
.upsell-card-price { font-weight: 700; color: #f97316; font-size: 16px; margin-left: auto; white-space: nowrap; }

/* ── Toggle switch ────────────────────────────────────────────────────────── */
.toggle-switch {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}
.toggle-switch input[type="checkbox"] { display: none; }
.toggle-slider {
    display: inline-block;
    width: 44px;
    height: 24px;
    background: #d1d5db;
    border-radius: 12px;
    position: relative;
    transition: background 0.2s;
    flex-shrink: 0;
}
.toggle-slider::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    top: 3px;
    left: 3px;
    transition: transform 0.2s;
}
.toggle-switch input:checked + .toggle-slider { background: #f97316; }
.toggle-switch input:checked + .toggle-slider::after { transform: translateX(20px); }
.toggle-label { font-weight: 600; font-size: 14px; color: #374151; }

/* ── Checkbox cards ───────────────────────────────────────────────────────── */
.checkbox-group { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.checkbox-card {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px 14px;
    cursor: pointer;
    transition: border-color 0.18s;
}
.checkbox-card:hover { border-color: #f97316; }
.checkbox-card input[type="checkbox"] { accent-color: #f97316; width: 16px; height: 16px; }
.checkbox-card span:first-of-type { flex: 1; font-size: 14px; color: #374151; }
.checkbox-price { font-weight: 600; color: #f97316; font-size: 13px; white-space: nowrap; }

/* ── Extras grid (Steps 6 & 7) ───────────────────────────────────────────── */
.extras-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
}
.extras-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 18px 16px;
}
.extras-card-header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 14px;
}
.extras-icon { font-size: 22px; line-height: 1; }
.extras-title { font-weight: 700; font-size: 15px; color: #1f2937; }
.extras-price { font-size: 12px; color: #6b7280; margin-top: 2px; }
.form-row-inline {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 4px;
}
.form-row-inline label { font-size: 14px; color: #374151; flex: 1; }
/* Legacy number input (kept for dynamic extras from PHP) */
.form-row-inline input[type="number"]:not(.stepper-input) {
    width: 80px;
    padding: 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 16px;
    text-align: right;
    min-height: 44px;
}

/* ── Qty Stepper ──────────────────────────────────────────────────────────── */
.qty-stepper {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}
.stepper-btn {
    width: 44px;
    height: 44px;
    background: #f9fafb;
    border: none;
    font-size: 20px;
    font-weight: 700;
    color: #374151;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
    flex-shrink: 0;
    line-height: 1;
}
.stepper-btn:active { background: #e5e7eb; }
.stepper-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.stepper-input {
    width: 48px;
    height: 44px;
    border: none;
    border-left: 1px solid #e5e7eb;
    border-right: 1px solid #e5e7eb;
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    color: #111827;
    background: #fff;
    -moz-appearance: textfield;
}
.stepper-input::-webkit-outer-spin-button,
.stepper-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper-input:focus { outline: none; }

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #374151;
    cursor: pointer;
    margin-top: 6px;
}

/* ── Estimate breakdown table ────────────────────────────────────────────── */
.estimate-breakdown-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    margin-bottom: 20px;
}
.estimate-breakdown-table td { padding: 6px 10px; }
.breakdown-group-header td {
    background: #f3f4f6;
    font-weight: 700;
    color: #374151;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 8px 10px 4px;
    border-top: 1px solid #e5e7eb;
}
.breakdown-item td { border-bottom: 1px solid #f3f4f6; }
.breakdown-desc { color: #4b5563; }
.breakdown-amount { text-align: right; font-weight: 600; white-space: nowrap; }
.breakdown-discount { color: #16a34a; }
.breakdown-label { color: #374151; font-weight: 600; }
.breakdown-total { color: #1f2937; font-size: 17px; font-weight: 800; }
tfoot tr:last-child td { border-top: 2px solid #111827; padding-top: 10px; }

/* ── Contact form section ─────────────────────────────────────────────────── */
.contact-form-section {
    background: transparent;
    border: none;
    border-top: 2px solid #e5e7eb;
    border-radius: 0;
    padding: 20px 0 0;
    margin-top: 24px;
}
.contact-form-section h4 { font-size: 16px; font-weight: 700; color: #111827; margin-bottom: 4px; }
.contact-form-section p { font-size: 13px; color: #6b7280; margin-bottom: 16px; }
.btn-submit {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    font-weight: 700;
    margin-top: 8px;
}

/* ── Calculating spinner ──────────────────────────────────────────────────── */
.calculating-spinner {
    text-align: center;
    padding: 24px;
    color: #6b7280;
}
.calculating-spinner .spinner {
    display: inline-block;
    width: 32px;
    height: 32px;
    border: 3px solid #f3f4f6;
    border-top-color: #f97316;
    border-radius: 50%;
    animation: concrete-spin 0.8s linear infinite;
    margin-bottom: 10px;
}
@keyframes concrete-spin { to { transform: rotate(360deg); } }

/* ── Navigation buttons — sticky at bottom of viewport ───────────────────── */
.calculator-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 200;
    background: #fff;
    border-top: 1px solid #e5e7eb;
    padding: 12px 20px;
    /* Extra clearance for iOS home indicator and Android gesture bar */
    padding-bottom: max(12px, calc(12px + env(safe-area-inset-bottom, 0px)));
    margin: 0 -20px -20px;  /* bleed to edges inside the form's padding */
    box-shadow: 0 -2px 8px rgba(0,0,0,0.08);
}

/* ── Floating Sales Notes FAB ────────────────────────────────────────────── */
#cc-notes-fab {
    position: fixed;
    bottom: 80px;
    right: 16px;
    z-index: 1050;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #1f2937;
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
    transition: background 0.2s, transform 0.15s;
    -webkit-tap-highlight-color: transparent;
}
#cc-notes-fab:active { transform: scale(0.92); }
#cc-notes-fab.has-notes { background: #059669; }
.cc-notes-fab-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #f97316;
    border: 2px solid #fff;
    display: none;
}
#cc-notes-fab.has-notes .cc-notes-fab-badge { display: block; }

/* ── Sales Notes Drawer ──────────────────────────────────────────────────── */
#cc-notes-drawer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1060;
    background: #fff;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -8px 32px rgba(0,0,0,0.18);
    padding: 20px 20px 32px;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
    max-height: 70vh;
    overflow-y: auto;
}
#cc-notes-drawer.open { transform: translateY(0); }
.cc-notes-drawer-handle {
    width: 40px;
    height: 4px;
    background: #d1d5db;
    border-radius: 2px;
    margin: 0 auto 16px;
}
.cc-notes-drawer-title {
    font-size: 16px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 14px;
}
.cc-quick-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}
.cc-quick-tag {
    padding: 6px 12px;
    border: 1.5px solid #e5e7eb;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    background: #f9fafb;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    -webkit-tap-highlight-color: transparent;
}
.cc-quick-tag:active,
.cc-quick-tag.used {
    border-color: #f97316;
    background: #fff7ed;
    color: #c2410c;
}
#cc-notes-drawer-textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #d1d5db;
    border-radius: 10px;
    font-size: 16px;
    font-family: inherit;
    resize: none;
    min-height: 100px;
    box-sizing: border-box;
    color: #111827;
}
#cc-notes-drawer-textarea:focus {
    outline: none;
    border-color: #f97316;
    box-shadow: 0 0 0 3px rgba(249,115,22,0.12);
}
#cc-notes-drawer-overlay {
    position: fixed;
    inset: 0;
    z-index: 1055;
    background: rgba(0,0,0,0.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}
#cc-notes-drawer-overlay.open { opacity: 1; pointer-events: all; }

/* ── Responsive ───────────────────────────────────────────────────────────── */
/* NOTE: Full responsive stack is at the bottom of this file (Mobile/Tablet sections).
   This legacy block kept for unscoped fallback only. */
@media (max-width: 600px) {
    .form-row-group { grid-template-columns: 1fr 1fr; }
    .option-cards-grid { grid-template-columns: 1fr 1fr; }
    .extras-grid { grid-template-columns: 1fr; }
    .upsell-card-price { margin-left: 0; }
    .cc-bar-total-wrap { align-items: flex-start; }
    /* FAB sits above sticky bar */
    #cc-notes-fab { bottom: 76px; }
}

/* ── New UX feature styles ─────────────────────────────────────────── */

/* Subsection headings inside merged Add-Ons step */
.subsection-heading {
    font-size: 14px;
    font-weight: 700;
    color: #374151;
    margin-top: 20px;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid #e5e7eb;
}

/* Sticky bottom price bar */
#cc-bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: #111827;
    color: #fff;
    padding: 12px 20px;
    /* Extra clearance for iOS home indicator and Android gesture bar */
    padding-bottom: max(12px, calc(12px + env(safe-area-inset-bottom, 0px)));
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.18);
}
.cc-bar-details {
    display: flex;
    gap: 10px;
    font-size: 13px;
    color: #9ca3af;
    flex-wrap: wrap;
    align-items: center;
}
.cc-bar-sep { color: #4b5563; }
.cc-bar-total-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    min-width: 140px;
}
.cc-bar-label { font-size: 11px; color: #9ca3af; }
.cc-bar-total {
    font-size: 18px;
    font-weight: 800;
    color: #f97316;
    white-space: nowrap;
}
.cc-bar-total.calculating { color: #6b7280; }
.cc-bar-total.pulse {
    animation: cc-price-pulse 0.4s ease-out;
}
@keyframes cc-price-pulse {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.12); color: #fff; }
    100% { transform: scale(1); }
}

/* Range preview banner (Step 1) */
.range-preview-banner {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    color: #166534;
    margin-top: 12px;
}
.range-preview-banner strong { color: #15803d; }
.range-hint { font-size: 12px; color: #6b7280; }

/* Option card tags (data-tag attribute) */
.option-card[data-tag]::before {
    content: attr(data-tag);
    position: absolute;
    top: -1px;
    right: -1px;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 0 8px 0 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.option-card[data-tag="most-common"]::before {
    content: 'Most Common';
    background: #dbeafe;
    color: #1d4ed8;
}
.option-card[data-tag="recommended"]::before {
    content: 'Recommended';
    background: #dcfce7;
    color: #15803d;
}
.option-card[data-tag="premium"]::before {
    content: 'Premium';
    background: #fde8d8;
    color: #c2410c;
}

/* Impact-on-project label (appended by JS inside .option-card-price) */
.impact-on-project {
    display: block;
    font-size: 10px;
    color: #6b7280;
    font-weight: 400;
    margin-top: 2px;
}

/* Cost split (base vs upgrades) */
.cc-cost-split {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 16px;
}
.cc-cost-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 14px;
    color: #374151;
}
.cc-cost-row span:last-child { font-weight: 700; }
.cc-cost-upgrades { color: #f97316; }

/* Price range */
.cc-price-range {
    text-align: center;
    font-size: 14px;
    color: #6b7280;
    padding: 8px;
    margin-bottom: 16px;
}
.cc-price-range strong {
    font-size: 16px;
    font-weight: 800;
    color: #111827;
}

/* Toast notification */
.cc-toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #1f2937;
    color: #fff;
    padding: 10px 18px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    z-index: 1100;
    white-space: nowrap;
    pointer-events: none;
}
.cc-toast--visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Sales notes textarea (Step 7 — also synced from FAB drawer) */
#concrete-sales-notes {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #d1d5db;
    border-radius: 10px;
    font-size: 16px;
    font-family: inherit;
    resize: vertical;
    min-height: 100px;
    box-sizing: border-box;
}
#concrete-sales-notes:focus {
    outline: none;
    border-color: #f97316;
    box-shadow: 0 0 0 3px rgba(249,115,22,0.12);
}

/* ══════════════════════════════════════════════════════════════════════════════
   RESPONSIVE — MOBILE + SALES TABLET
   ══════════════════════════════════════════════════════════════════════════════ */

/* ── Always-on: full-bleed form, clear content above sticky nav ─────────── */
.concrete-wizard-root .silva-calculator-form {
    background: transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 20px 20px 90px;
    margin: 0;
}
/* Extra clearance on mobile where nav is sticky */
@media (max-width: 768px) {
    .concrete-wizard-root .calculator-step.active {
        padding-bottom: 72px;
    }
}

/* ══════════════════════════════════════════════════════════════════════════════
   SALES TABLET  (769 – 1200px)
   Targets: iPad portrait (768), iPad landscape (1024), Android/Windows tablets
   used by sales reps presenting estimates to clients in the field.
   ══════════════════════════════════════════════════════════════════════════════ */
@media (min-width: 769px) and (max-width: 1200px) {

    /* Larger option cards — comfortable tap target at arm's length */
    .concrete-wizard-root .option-cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 14px;
    }
    .concrete-wizard-root .option-card {
        padding: 20px 14px;
        min-height: 88px;
    }
    .concrete-wizard-root .option-card-icon { font-size: 30px; }
    .concrete-wizard-root .option-card-title { font-size: 15px; }
    .concrete-wizard-root .option-card-desc  { font-size: 13px; }
    .concrete-wizard-root .option-card-price { font-size: 14px; }

    /* Extras cards — 2-col fills tablet width nicely */
    .concrete-wizard-root .extras-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Checkbox cards — easy tap */
    .concrete-wizard-root .checkbox-card {
        padding: 14px 18px;
        min-height: 52px;
    }

    /* Navigation buttons — fat-finger proof */
    .concrete-wizard-root .calculator-nav .btn {
        min-height: 52px;
        font-size: 17px;
        padding: 14px 40px;
    }

    /* Sticky bottom bar — large for client-facing price display */
    #cc-bottom-bar {
        padding: 16px 32px;
    }
    .concrete-wizard-root .cc-bar-total {
        font-size: 22px;
    }
    .concrete-wizard-root .cc-bar-label {
        font-size: 13px;
    }
    .concrete-wizard-root .cc-bar-details {
        font-size: 14px;
    }

    /* Form inputs — visually larger for tablet */
    .concrete-wizard-root input[type="number"],
    .concrete-wizard-root input[type="text"],
    .concrete-wizard-root select,
    .concrete-wizard-root textarea {
        font-size: 16px;
        padding: 10px 12px;
        min-height: 48px;
    }

    /* Step title sizing */
    .concrete-wizard-root .step-title    { font-size: 24px; }
    .concrete-wizard-root .step-subtitle { font-size: 16px; }

    /* Area dims row */
    .concrete-wizard-root .area-dims-row {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }

    /* Toast stays above sticky bar */
    .concrete-wizard-root .cc-toast { bottom: 90px; }
    #cc-notes-fab { bottom: 90px; }
}

/* ══════════════════════════════════════════════════════════════════════════════
   PHONE LANDSCAPE + SMALL TABLET  (≤768px)
   ══════════════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {

    .concrete-wizard-root .step-title    { font-size: 19px; }
    .concrete-wizard-root .step-subtitle { font-size: 14px; margin-bottom: 20px; }

    /* Area entry: full-width dims row */
    .concrete-wizard-root .area-dims-row {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    /* Compress bottom bar pill labels */
    .concrete-wizard-root .cc-bar-details {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 4px;
        font-size: 12px;
    }

    /* Toast above sticky bar */
    .concrete-wizard-root .cc-toast { bottom: 90px; }
    #cc-notes-fab { bottom: 76px; }
}

/* ══════════════════════════════════════════════════════════════════════════════
   MOBILE PHONES  (≤600px)  — extends the existing block above ─────────────────
   ══════════════════════════════════════════════════════════════════════════════ */
@media (max-width: 600px) {

    /* ── iOS Safari auto-zoom fix — any input < 16px triggers viewport zoom ── */
    .concrete-wizard-root input,
    .concrete-wizard-root select,
    .concrete-wizard-root textarea {
        font-size: 16px !important;
    }

    /* ── Navigation buttons: full-width, Back below Continue ─────────────── */
    .concrete-wizard-root .calculator-nav {
        flex-direction: column-reverse;
        gap: 10px;
    }
    .concrete-wizard-root .calculator-nav .btn {
        width: 100%;
        text-align: center;
        padding: 18px;
        font-size: 16px;
        box-sizing: border-box;
    }

    /* ── Toast above sticky bar ──────────────────────────────────────────── */
    .concrete-wizard-root .cc-toast { bottom: 90px; }

    /* ── FAB above sticky bar ────────────────────────────────────────────── */
    #cc-notes-fab { bottom: 76px; right: 12px; }

    /* ── Option cards: tappable 2-col ───────────────────────────────────── */
    .concrete-wizard-root .option-cards-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    .concrete-wizard-root .option-card {
        padding: 16px 10px;
        min-height: 72px;
    }
}

/* ══════════════════════════════════════════════════════════════════════════════
   SMALL PHONES  (≤480px)
   ══════════════════════════════════════════════════════════════════════════════ */
@media (max-width: 480px) {

    /* More popover — stretch full-width on small screens */
    .area-more-popover {
        width: 100%;
        right: 0;
        left: 0;
    }

    /* Keep 5-col tiles on mobile — More stays on the same row */
    .concrete-wizard-root .area-type-tiles {
        grid-template-columns: repeat(5, 1fr);
        gap: 6px;
    }
    .concrete-wizard-root .area-type-tile {
        padding: 10px 4px;
        min-height: 60px;
        gap: 4px;
    }
    .concrete-wizard-root .area-type-tile-icon { font-size: 18px; }
    .concrete-wizard-root .area-type-tile-label { font-size: 10px; }

    /* Area entry: fully stacked — type, length, width each own row */
    .concrete-wizard-root .form-row-group {
        grid-template-columns: 1fr;
    }
    .concrete-wizard-root .form-row-group > *:first-child {
        grid-column: auto;
    }
    /* Dims: keep side-by-side on small phones to save vertical space */
    .concrete-wizard-root .area-dims-row {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    .concrete-wizard-root .area-dims-row .form-row input[type="number"] {
        height: 48px;
        font-size: 18px;
    }

    /* Inline rows (extras qty inputs) — stack label above input */
    .concrete-wizard-root .form-row-inline {
        flex-wrap: wrap;
        gap: 6px;
    }
    .concrete-wizard-root .form-row-inline label {
        flex: 0 0 100%;
    }
    .concrete-wizard-root .form-row-inline input[type="number"] {
        width: 100%;
        min-height: 44px;
        text-align: left;
        box-sizing: border-box;
    }

    /* Area card summary — stack info vertically */
    .concrete-wizard-root .area-card-info {
        flex-direction: column;
        gap: 2px;
        align-items: flex-start;
    }

    /* Compact bottom bar */
    #cc-bottom-bar { padding: 10px 14px; }
    .concrete-wizard-root .cc-bar-total  { font-size: 16px; }
    .concrete-wizard-root .cc-bar-label  { font-size: 10px; }
    .concrete-wizard-root .cc-bar-details { font-size: 11px; }

    /* Upsell card: stack icon/text/price vertically */
    .concrete-wizard-root .upsell-card-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .concrete-wizard-root .upsell-card-price {
        margin-left: 0;
    }

    /* Option cards — 2-col on small phones (already set for ≤600px) */

    /* Subsection headings */
    .concrete-wizard-root .subsection-heading {
        font-size: 13px;
    }

    /* Range preview banner — wrap tighter */
    .concrete-wizard-root .range-preview-banner {
        font-size: 13px;
        padding: 10px 12px;
    }

    /* Estimate breakdown table — horizontal scroll on tiny screens */
    .concrete-wizard-root .estimate-breakdown-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Contact form — full-width inputs */
    .concrete-wizard-root .contact-form-section input,
    .concrete-wizard-root .contact-form-section textarea {
        width: 100%;
        box-sizing: border-box;
    }
}

/* ══════════════════════════════════════════════════════════════════════════════
   MERGED STEP 4 — seamless two-block join
   ══════════════════════════════════════════════════════════════════════════════ */
.concrete-wizard-root .calculator-step--merged {
    margin-top: 0;
    padding-top: 0;
}
.concrete-wizard-root .calculator-step--merged:not(.active) {
    display: none;
}
.concrete-wizard-root .step-merge-divider {
    font-size: 13px;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 18px 0 10px;
    border-top: 1px solid #e5e7eb;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ══════════════════════════════════════════════════════════════════════════════
   ADD-ON CHECKLIST (Step 5)
   ══════════════════════════════════════════════════════════════════════════════ */
.addon-checklist {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 8px;
}
.addon-section-label {
    font-size: 11px;
    font-weight: 700;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 10px 0 4px;
    border-bottom: 1px solid #f3f4f6;
}
.addon-row {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    transition: border-color 0.15s;
}
.addon-row:has(.addon-toggle:checked),
.addon-row:has(input[name="curb_cut"]:checked) {
    border-color: #f97316;
    background: #fff7ed;
}
.addon-row-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    cursor: pointer;
    width: 100%;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}
.addon-row-trigger input[type="checkbox"] {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    accent-color: #f97316;
    cursor: pointer;
}
.addon-row-icon {
    font-size: 18px;
    flex-shrink: 0;
    line-height: 1;
}
.addon-row-name {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
    color: #111827;
}
.addon-row-sub {
    font-weight: 400;
    color: #6b7280;
    font-size: 12px;
}
.addon-row-price {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    white-space: nowrap;
    flex-shrink: 0;
}
.addon-row:has(.addon-toggle:checked) .addon-row-price,
.addon-row:has(input[name="curb_cut"]:checked) .addon-row-price {
    color: #c2410c;
}
.addon-qty-reveal {
    padding: 0 14px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* ══════════════════════════════════════════════════════════════════════════════
   DISCOUNT COLLAPSIBLE (Review step)
   ══════════════════════════════════════════════════════════════════════════════ */
.discount-collapsible {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
}
.discount-toggle-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 16px;
    background: #f9fafb;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    text-align: left;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.15s;
}
.discount-toggle-btn:hover { background: #f3f4f6; }
.discount-toggle-arrow {
    font-size: 12px;
    color: #9ca3af;
    flex-shrink: 0;
}
.discount-collapse-body {
    padding: 4px 16px 16px;
    border-top: 1px solid #e5e7eb;
    background: #fff;
}


/* -- Checkbox option cards (Step 3A multi-select) -------------------------- */
.option-cards-grid--multi {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}
.option-card--check {
    position: relative;
}
.option-card-check-indicator {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 18px;
    height: 18px;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    background: #fff;
    transition: background 0.15s, border-color 0.15s;
    flex-shrink: 0;
}
.option-card--check.selected .option-card-check-indicator {
    background: #f97316;
    border-color: #f97316;
}
.option-card--check.selected .option-card-check-indicator::after {
    content: '';
    display: block;
    width: 4px;
    height: 8px;
    border: 2px solid #fff;
    border-top: none;
    border-left: none;
    transform: rotate(45deg) translate(2px, -1px);
    margin: 1px auto 0;
}

/* -- Option A/B/C comparison cards (Step 6) -------------------------------- */
.cc-options-grid {
    margin-bottom: 20px;
}
.cc-options-prompt {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 12px;
    text-align: center;
}
.cc-options-cards {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.cc-option-card {
    flex: 1;
    min-width: 120px;
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 14px;
    padding: 16px 14px;
    cursor: pointer;
    text-align: center;
    transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
    -webkit-tap-highlight-color: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}
.cc-option-card:hover {
    border-color: #f97316;
    background: #fffbf7;
}
.cc-option-card.selected {
    border-color: #f97316;
    border-width: 2.5px;
    background: #fff7ed;
    box-shadow: 0 0 0 3px rgba(249,115,22,0.18);
}
.cc-option-card__badge {
    display: inline-block;
    background: #f97316;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 4px;
    margin-bottom: 2px;
}
.cc-option-card.selected .cc-option-card__badge {
    background: #ea580c;
}
.cc-option-card__name {
    font-weight: 600;
    font-size: 13px;
    color: #374151;
    line-height: 1.3;
}
.cc-option-card__total {
    font-size: 22px;
    font-weight: 800;
    color: #f97316;
    line-height: 1.1;
}
.cc-option-card.selected .cc-option-card__total {
    color: #ea580c;
}
.cc-option-card__range {
    font-size: 11px;
    color: #9ca3af;
    line-height: 1.2;
}

/* ── Tabbed finish comparison (Step 6, 2+ finishes) ─────────────────────── */
.cc-options-tabs {
    margin-bottom: 20px;
}

/* Tab bar — scrollable strip so all tabs always fit on narrow phones */
.cc-tab-bar {
    display: flex;
    gap: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 0;
}
.cc-tab-bar::-webkit-scrollbar { display: none; }

/* Individual tab button */
.cc-tab {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    padding: 10px 18px 12px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    text-align: center;
    transition: border-color 0.15s, background 0.15s;
    -webkit-tap-highlight-color: transparent;
    min-width: 100px;
    position: relative;
    bottom: -2px; /* overlap the bar border */
}
.cc-tab:hover {
    background: #fff7ed;
}
.cc-tab.active {
    border-bottom-color: #f97316;
    background: #fff7ed;
}
.cc-tab__letter {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #9ca3af;
}
.cc-tab.active .cc-tab__letter {
    color: #f97316;
}
.cc-tab__name {
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    line-height: 1.2;
    max-width: 110px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cc-tab.active .cc-tab__name {
    color: #111827;
}
.cc-tab__price {
    font-size: 16px;
    font-weight: 800;
    color: #f97316;
    line-height: 1.1;
}
.cc-tab.active .cc-tab__price {
    color: #ea580c;
}

/* Tab panels */
.cc-tab-panels {
    padding-top: 16px;
}
.cc-tab-panel {
    animation: cc-tab-fade-in 0.18s ease;
}
@keyframes cc-tab-fade-in {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0);   }
}

/* Price range inside tab panel */
.cc-tab-price-range {
    margin-top: 10px;
    margin-bottom: 4px;
}

/* ── Estimate action buttons (estimate-builder context) ─────────────────── */
.cc-estimate-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px 0 8px;
    text-align: center;
}
.cc-estimate-actions__hint {
    color: #6b7280;
    font-size: 13px;
    margin: 0;
}
.cc-btn-add-all {
    background: #fff;
    color: #f97316;
    border: 2px solid #f97316;
    border-radius: 8px;
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.18s, color 0.18s;
    width: 100%;
    box-sizing: border-box;
}
.cc-btn-add-all:hover {
    background: #fff7ed;
}
.cc-btn-add-selected {
    background: #10b981;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 16px 24px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.18s;
    width: 100%;
    box-sizing: border-box;
}
.cc-btn-add-selected:hover {
    background: #059669;
}

/* Mobile: allow tab names to wrap slightly on very small screens */
@media (max-width: 400px) {
    .cc-tab {
        min-width: 80px;
        padding: 8px 10px 10px;
    }
    .cc-tab__name {
        white-space: normal;
        max-width: 80px;
        font-size: 11px;
    }
    .cc-tab__price {
        font-size: 14px;
    }
}

/* ── Scope of Work ───────────────────────────────────────────────────────── */
.cc-scope-of-work {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px 22px;
    margin-bottom: 20px;
}

.cc-scope-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    color: #014385;
    border-bottom: 2px solid #014385;
    padding-bottom: 10px;
    margin-bottom: 16px;
}

.cc-scope-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 24px;
}

.cc-scope-section {
    min-width: 0;
}

.cc-scope-heading {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #374151;
    margin-bottom: 6px;
}

.cc-scope-bullets {
    margin: 0;
    padding: 0 0 0 16px;
    list-style: disc;
}

.cc-scope-bullets li {
    font-size: 13px;
    color: #4b5563;
    line-height: 1.55;
    margin-bottom: 3px;
}

@media (max-width: 560px) {
    .cc-scope-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Scope of Work inline (inside line item description) ────────────────── */
.cc-scope-inline {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
}

.cc-scope-inline .cc-scope-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 20px;
}

.cc-scope-inline .cc-scope-section {
    min-width: 0;
}

.cc-scope-inline .cc-scope-heading {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #374151;
    margin-bottom: 5px;
}

.cc-scope-inline .cc-scope-bullets {
    margin: 0;
    padding: 0 0 0 14px;
    list-style: disc;
}

.cc-scope-inline .cc-scope-bullets li {
    font-size: 12px;
    color: #4b5563;
    line-height: 1.5;
    margin-bottom: 2px;
}

/* Align price to top of cell when scope content is present */
.breakdown-item--has-scope td {
    vertical-align: top;
}

@media (max-width: 560px) {
    .cc-scope-inline .cc-scope-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Specs included panel (Step 4) ─────────────────────────────────────── */
.specs-included-panel {
    background: #f0f7ff;
    border: 1px solid #bfdbfe;
    border-left: 4px solid #014385;
    border-radius: 12px;
    padding: 20px 22px;
}
.specs-included-title {
    font-size: 14px;
    font-weight: 700;
    color: #014385;
    margin-bottom: 18px;
}
.specs-included-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 24px;
}
.specs-included-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.specs-item-label {
    font-size: 13px;
    font-weight: 700;
    color: #1e3a5f;
}
.specs-item-desc {
    font-size: 12px;
    color: #4b5563;
    line-height: 1.5;
}
@media (max-width: 560px) {
    .specs-included-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Per-area finish overrides ───────────────────────────────────────────── */
#cc-area-finish-overrides {
    margin-top: 20px;
    border-top: 1px solid #e5e7eb;
    padding-top: 16px;
}

.cc-area-overrides-header {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.cc-area-overrides-title {
    font-weight: 700;
    font-size: 14px;
    color: #014385;
}

.cc-area-overrides-hint {
    font-size: 12px;
    color: #6b7280;
}

.cc-area-finish-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f3f4f6;
    flex-wrap: wrap;
}

.cc-area-finish-row:last-child {
    border-bottom: none;
}

.cc-area-finish-row-label {
    display: flex;
    flex-direction: column;
    min-width: 110px;
    flex: 0 0 auto;
}

.cc-area-finish-row-name {
    font-size: 13px;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.3;
}

.cc-area-finish-row-sqft {
    font-size: 11px;
    color: #6b7280;
    margin-top: 1px;
}

.cc-area-finish-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    flex: 1;
}

.cc-area-finish-chip {
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    line-height: 1.4;
}

.cc-area-finish-chip:hover {
    border-color: #014385;
    color: #014385;
}

.cc-area-finish-chip.active {
    background: #014385;
    color: #ffffff;
    border-color: #014385;
}

.cc-area-finish-chip.is-global {
    background: #e8f0fe;
    border-color: #94b4e8;
    color: #014385;
}

.cc-area-finish-chip.active.is-global {
    background: #014385;
    color: #ffffff;
}

@media (max-width: 560px) {
    .cc-area-finish-row {
        flex-direction: column;
        align-items: flex-start;
    }
}
