/**
 * Remodel Estimator Wizard Styles
 * Builds on top of calculator-base.css (loaded first).
 */

/* ── Token bridge: map shared design system tokens to remodel's amber palette ── */
.silva-calculator-container[data-calculator-type="remodel"] {
    --calc-primary:           #d97706;
    --calc-primary-dark:      #b45309;
    --calc-primary-light:     #fffbeb;
    --calc-total-gradient:    linear-gradient(135deg, #d97706, #b45309);
    --calc-accent:            #f59e0b;
}

/* ── Hide WordPress page title when calculator is present ───────────────── */
body:has(.remodel-wizard-root) .entry-header,
body:has(.remodel-wizard-root) .entry-header * {
    display: none !important;
}

/* ── Full-bleed root ─────────────────────────────────────────────────────── */
.remodel-wizard-root.silva-calculator-container {
    margin: 0 auto !important;
    padding: 0 !important;
    max-width: 860px !important;
}

/* ── Header ─────────────────────────────────────────────────────────────── */
.remodel-wizard-root .silva-calculator-header {
    padding: 24px 24px 0;
    margin-bottom: 8px;
}
.remodel-wizard-root .silva-calculator-header h2 {
    font-size: 22px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 4px;
}
.remodel-wizard-root .silva-calculator-header p {
    color: #6b7280;
    font-size: 14px;
    margin: 0;
}

/* ── Progress bar ────────────────────────────────────────────────────────── */
.remodel-wizard-root .silva-calculator-progress {
    padding: 12px 24px 0;
    display: flex;
    align-items: center;
    gap: 12px;
}
.remodel-wizard-root .progress-bar {
    flex: 1;
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
}
.remodel-wizard-root .progress-fill {
    height: 100%;
    background: #d97706;
    border-radius: 3px;
    transition: width 0.3s ease;
}
.remodel-wizard-root .progress-text {
    font-size: 12px;
    color: #9ca3af;
    white-space: nowrap;
}

/* ── Step dots ───────────────────────────────────────────────────────────── */
.remodel-step-dots {
    display: flex;
    gap: 8px;
    padding: 10px 24px 0;
}
.remodel-step-dots .step-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #d1d5db;
    transition: background 0.2s, transform 0.2s;
}
.remodel-step-dots .step-dot.active {
    background: #d97706;
    transform: scale(1.3);
}
.remodel-step-dots .step-dot.completed {
    background: #10b981;
}

/* ── Step container ──────────────────────────────────────────────────────── */
.remodel-wizard-root .calculator-step {
    display: none;
    padding: 24px;
    animation: rmdFadeIn 0.25s ease;
}
.remodel-wizard-root .calculator-step.active {
    display: block;
}
@keyframes rmdFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Step header ─────────────────────────────────────────────────────────── */
.remodel-wizard-root .step-header {
    margin-bottom: 20px;
}
.remodel-wizard-root .step-title {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 4px;
}
.remodel-wizard-root .step-subtitle {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
}

/* ── Step error ──────────────────────────────────────────────────────────── */
.remodel-wizard-root .step-error {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #b91c1c;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 12px;
}

/* ── Step nav buttons ────────────────────────────────────────────────────── */
.remodel-wizard-root .step-nav {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #f3f4f6;
}
.remodel-wizard-root .btn-prev {
    background: transparent;
    border: 1px solid #d1d5db;
    color: #374151;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
}
.remodel-wizard-root .btn-prev:hover { background: #f9fafb; }
.remodel-wizard-root .btn-next,
.remodel-wizard-root .btn-submit {
    background: #d97706;
    color: #fff;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}
.remodel-wizard-root .btn-next:hover,
.remodel-wizard-root .btn-submit:hover { background: #b45309; }
.remodel-wizard-root .btn-submit:disabled { opacity: 0.6; cursor: not-allowed; }

/* ── Step 1: Service grid ────────────────────────────────────────────────── */
.remodel-service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}
.remodel-service-card {
    position: relative;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    padding: 16px;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    text-align: center;
    background: #fff;
}
.remodel-service-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.remodel-service-card:hover {
    border-color: #d97706;
    box-shadow: 0 0 0 3px rgba(217,119,6,.08);
}
.remodel-service-card.selected,
.remodel-service-card:has(input:checked) {
    border-color: #d97706;
    background: #fffbeb;
    box-shadow: 0 0 0 3px rgba(217,119,6,.12);
}
.service-card-icon { font-size: 28px; margin-bottom: 6px; }
.service-card-label {
    font-size: 14px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 4px;
}
.service-card-desc {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.4;
}

/* ── Step 2: Sqft input ──────────────────────────────────────────────────── */
.remodel-sqft-wrapper {
    max-width: 420px;
    margin-bottom: 16px;
}
.sqft-input-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.sqft-input {
    flex: 1;
    font-size: 28px !important;
    font-weight: 700 !important;
    text-align: center;
    padding: 12px !important;
}
.sqft-unit {
    font-size: 16px;
    color: #6b7280;
    font-weight: 500;
}
.sqft-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 12px;
}
.sqft-preset-label { font-size: 12px; color: #9ca3af; }
.sqft-preset-btn {
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    color: #374151;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.15s;
}
.sqft-preset-btn:hover { background: #e5e7eb; }
.sqft-live-estimate {
    font-size: 13px;
    color: #6b7280;
    padding: 10px 14px;
    background: #f9fafb;
    border-radius: 8px;
}
.sqft-estimate-label { margin-right: 6px; }
.sqft-estimate-value { font-weight: 700; color: #d97706; }

/* ── Step 3: Tier cards ──────────────────────────────────────────────────── */
.remodel-tier-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}
.remodel-tier-card {
    position: relative;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    padding: 16px;
    cursor: pointer;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    text-align: center;
}
.remodel-tier-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.remodel-tier-card:hover {
    border-color: #d97706;
    box-shadow: 0 0 0 3px rgba(217,119,6,.08);
}
.remodel-tier-card.selected,
.remodel-tier-card:has(input:checked) {
    border-color: #d97706;
    background: #fffbeb;
    box-shadow: 0 0 0 3px rgba(217,119,6,.12);
}
.remodel-tier-card.recommended {
    border-color: #d97706;
}
.tier-badge {
    background: #d97706;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 2px 8px;
    border-radius: 99px;
    display: inline-block;
    margin-bottom: 6px;
}
.tier-card-name {
    font-size: 15px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 4px;
}
.tier-card-tagline {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 6px;
    line-height: 1.4;
}
.tier-card-examples {
    font-size: 11px;
    color: #9ca3af;
    margin-bottom: 6px;
    line-height: 1.4;
}
.tier-card-multiplier {
    font-size: 13px;
    font-weight: 700;
    color: #d97706;
}

/* ── Step 4: Add-ons ─────────────────────────────────────────────────────── */
.remodel-addons-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}
.remodel-addon-row {
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px 14px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    background: #fff;
}
.remodel-addon-row:hover { background: #f9fafb; }
.remodel-addon-row:has(input:checked) {
    background: #fffbeb;
    border-color: #d97706;
}
.remodel-addon-row input[type="checkbox"] {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    accent-color: #d97706;
}
.addon-info { flex: 1; }
.addon-name { display: block; font-size: 14px; font-weight: 600; color: #111827; }
.addon-desc { font-size: 12px; color: #6b7280; }
.addon-price {
    font-size: 13px;
    font-weight: 700;
    color: #d97706;
    white-space: nowrap;
}
.remodel-live-total {
    background: #fffbeb;
    border: 2px solid #fde68a;
    border-radius: 10px;
    padding: 16px 20px;
    text-align: center;
    margin-top: 16px;
}
.live-total-label { font-size: 13px; color: #92400e; font-weight: 500; }
.live-total-amount { font-size: 32px; font-weight: 800; color: #92400e; margin: 4px 0; }
.live-total-note { font-size: 11px; color: #b45309; }

/* ── Step 5: Contact + summary layout ───────────────────────────────────── */
.remodel-contact-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 24px;
    align-items: start;
    margin-bottom: 16px;
}
@media (max-width: 640px) {
    .remodel-contact-layout { grid-template-columns: 1fr; }
}
.remodel-contact-form .silva-field-group {
    margin-bottom: 14px;
}
.remodel-contact-form label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 4px;
}
.remodel-contact-form .required { color: #ef4444; }
.remodel-contact-form .silva-input {
    width: 100%;
    box-sizing: border-box;
    padding: 9px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    color: #111827;
    background: #fff;
    transition: border-color 0.15s;
}
.remodel-contact-form .silva-input:focus {
    outline: none;
    border-color: #d97706;
    box-shadow: 0 0 0 3px rgba(217,119,6,.1);
}
.remodel-contact-form textarea.silva-input { resize: vertical; }

/* Summary sidebar */
.remodel-estimate-summary {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 16px;
    font-size: 13px;
}
.remodel-estimate-summary h4 {
    font-size: 14px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 12px;
}
.summary-line {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px solid #e5e7eb;
    color: #374151;
}
.summary-line:last-child { border-bottom: none; }
.summary-divider { height: 1px; background: #d1d5db; margin: 8px 0; }
.summary-total-row {
    display: flex;
    justify-content: space-between;
    font-size: 15px;
    font-weight: 700;
    color: #111827;
    padding: 6px 0;
}
.summary-disclaimer {
    font-size: 11px;
    color: #9ca3af;
    margin: 8px 0 0;
    line-height: 1.4;
}

/* ── Success screen ──────────────────────────────────────────────────────── */
.remodel-success-screen {
    text-align: center;
    padding: 48px 24px;
}
.remodel-success-screen .success-icon {
    width: 56px;
    height: 56px;
    background: #10b981;
    color: #fff;
    font-size: 28px;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}
.remodel-success-screen h3 {
    font-size: 22px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 8px;
}
.remodel-success-screen p {
    color: #6b7280;
    font-size: 14px;
    max-width: 460px;
    margin: 0 auto 12px;
    line-height: 1.6;
}
.success-ref {
    font-size: 12px;
    color: #9ca3af;
}

/* ── Responsive tweaks ───────────────────────────────────────────────────── */
@media (max-width: 520px) {
    .remodel-service-grid { grid-template-columns: 1fr 1fr; }
    .remodel-tier-grid    { grid-template-columns: 1fr 1fr; }
}
