/* ═══════════════════════════════════════════════════════
   QUOTE CALCULATOR MODAL
   ═══════════════════════════════════════════════════════ */

/* ── Overlay ── */
.qc-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 99998;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s ease, visibility .3s ease;
}
.qc-overlay.qc-open {
    opacity: 1;
    visibility: visible;
}

/* ── Modal Shell ── */
.qc-modal {
    background: var(--white, #ffffff);
    border-radius: 18px;
    width: 100%;
    max-width: 620px;
    max-height: 92vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.40);
    transform: translateY(24px) scale(.97);
    transition: transform .35s cubic-bezier(.22, .61, .36, 1);
}
.qc-overlay.qc-open .qc-modal {
    transform: translateY(0) scale(1);
}

/* ── Header ── */
.qc-header {
    background: #1a1a2e;
    padding: 22px 28px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    border-bottom: 3px solid #e63329;
}
.qc-header-left h2 {
    font-size: 1.05rem;
    font-weight: 800;
    color: #fff;
    margin: 0 0 2px 0;
    letter-spacing: -.3px;
}
.qc-header-left p {
    font-size: .75rem;
    color: rgba(255,255,255,.5);
    margin: 0;
}
.qc-close {
    background: rgba(255,255,255,.1);
    border: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    color: rgba(255,255,255,.8);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
    flex-shrink: 0;
}
.qc-close:hover { background: rgba(255,255,255,.2); }

/* ── Step Progress ── */
.qc-progress {
    padding: 16px 28px 0;
    flex-shrink: 0;
    background: #fff;
}
.qc-progress-track {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 10px;
}
.qc-step-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #f0f2f5;
    border: 2px solid #e0e3e8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .7rem;
    font-weight: 800;
    color: #aaa;
    transition: all .3s ease;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}
.qc-step-dot.qc-dot--active {
    background: #e63329;
    border-color: #e63329;
    color: #fff;
    box-shadow: 0 0 0 4px rgba(230,51,41,.15);
}
.qc-step-dot.qc-dot--done {
    background: #1a1a2e;
    border-color: #1a1a2e;
    color: #fff;
}
.qc-step-line {
    flex: 1;
    height: 2px;
    background: #e0e3e8;
    position: relative;
    overflow: hidden;
}
.qc-step-line-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0%;
    background: #1a1a2e;
    transition: width .4s ease;
}
.qc-progress-labels {
    display: flex;
    justify-content: space-between;
}
.qc-progress-labels span {
    font-size: .62rem;
    color: #aaa;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .4px;
    text-align: center;
    width: 28px;
}
.qc-progress-labels span.qc-lbl--active { color: #e63329; }
.qc-progress-labels span.qc-lbl--done { color: #1a1a2e; }

/* ── Live Estimate Bar ── */
.qc-live-bar {
    background: linear-gradient(135deg, #1a1a2e 0%, #2a2a4e 100%);
    margin: 12px 28px 0;
    border-radius: 10px;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}
.qc-live-label {
    font-size: .7rem;
    color: rgba(255,255,255,.5);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}
.qc-live-amount {
    font-size: 1.25rem;
    font-weight: 900;
    color: #fff;
    transition: all .4s cubic-bezier(.22,.61,.36,1);
}
.qc-live-amount .qc-curr { font-size: .8rem; opacity: .7; margin-right: 2px; }

/* ── Scrollable Body ── */
.qc-body {
    overflow-y: auto;
    flex: 1;
    padding: 20px 28px 24px;
    scroll-behavior: smooth;
}
.qc-body::-webkit-scrollbar { width: 5px; }
.qc-body::-webkit-scrollbar-track { background: transparent; }
.qc-body::-webkit-scrollbar-thumb { background: #dde; border-radius: 8px; }

/* ── Step Panels ── */
.qc-step-panel {
    display: none;
}
.qc-step-panel.qc-panel--active {
    display: block;
    animation: qcPanelIn .3s ease both;
}
@keyframes qcPanelIn {
    from { opacity: 0; transform: translateX(18px); }
    to   { opacity: 1; transform: translateX(0); }
}
.qc-step-panel.qc-panel--back {
    animation: qcPanelBack .3s ease both;
}
@keyframes qcPanelBack {
    from { opacity: 0; transform: translateX(-18px); }
    to   { opacity: 1; transform: translateX(0); }
}

.qc-step-title {
    font-size: 1rem;
    font-weight: 800;
    color: #1a1a2e;
    margin: 0 0 4px 0;
}
.qc-step-subtitle {
    font-size: .8rem;
    color: #888;
    margin: 0 0 18px 0;
}

/* ── Project Type Cards ── */
.qc-type-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.qc-type-card {
    background: #f8f9fa;
    border: 2px solid #e8eaed;
    border-radius: 12px;
    padding: 16px 14px;
    cursor: pointer;
    transition: all .22s ease;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.qc-type-card:hover {
    border-color: #e63329;
    background: #fff8f8;
}
.qc-type-card.qc-selected {
    border-color: #e63329;
    background: #fff0ef;
    box-shadow: 0 0 0 3px rgba(230,51,41,.10);
}
.qc-type-icon {
    width: 40px;
    height: 40px;
    background: #fff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.qc-type-card.qc-selected .qc-type-icon { background: #e63329; }
.qc-type-info { flex: 1; min-width: 0; }
.qc-type-name {
    font-size: .82rem;
    font-weight: 800;
    color: #1a1a2e;
    margin: 0 0 2px 0;
    line-height: 1.3;
}
.qc-type-desc {
    font-size: .7rem;
    color: #999;
    margin: 0;
    line-height: 1.4;
}
.qc-type-price {
    font-size: .7rem;
    font-weight: 800;
    color: #e63329;
    margin: 4px 0 0 0;
}

/* ── Feature Checkboxes ── */
.qc-features-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.qc-feature-item {
    background: #f8f9fa;
    border: 2px solid #e8eaed;
    border-radius: 10px;
    padding: 11px 12px;
    cursor: pointer;
    transition: all .2s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    user-select: none;
}
.qc-feature-item:hover { border-color: #e63329; background: #fff8f8; }
.qc-feature-item.qc-feat-checked {
    border-color: #e63329;
    background: #fff0ef;
}
.qc-feat-check {
    width: 20px;
    height: 20px;
    border-radius: 5px;
    border: 2px solid #ddd;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all .2s;
}
.qc-feature-item.qc-feat-checked .qc-feat-check {
    background: #e63329;
    border-color: #e63329;
}
.qc-feat-check svg { display: none; }
.qc-feature-item.qc-feat-checked .qc-feat-check svg { display: block; }
.qc-feat-info { flex: 1; min-width: 0; }
.qc-feat-name {
    font-size: .78rem;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 1px 0;
}
.qc-feat-price {
    font-size: .68rem;
    color: #e63329;
    font-weight: 700;
    margin: 0;
}
.qc-feat-price.free { color: #2ecc71; }

/* ── Timeline / Budget ── */
.qc-radio-group { display: flex; flex-direction: column; gap: 8px; }
.qc-radio-item {
    background: #f8f9fa;
    border: 2px solid #e8eaed;
    border-radius: 10px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all .2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    user-select: none;
}
.qc-radio-item:hover { border-color: #e63329; background: #fff8f8; }
.qc-radio-item.qc-selected {
    border-color: #e63329;
    background: #fff0ef;
}
.qc-radio-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #ddd;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all .2s;
}
.qc-radio-item.qc-selected .qc-radio-dot {
    border-color: #e63329;
}
.qc-radio-item.qc-selected .qc-radio-dot::after {
    content: '';
    width: 10px;
    height: 10px;
    background: #e63329;
    border-radius: 50%;
}
.qc-radio-text {
    flex: 1;
}
.qc-radio-label {
    font-size: .82rem;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 1px 0;
}
.qc-radio-sub {
    font-size: .7rem;
    color: #999;
    margin: 0;
}
.qc-radio-badge {
    font-size: .65rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 50px;
    background: rgba(230,51,41,.12);
    color: #e63329;
    flex-shrink: 0;
}
.qc-radio-badge.badge--green {
    background: rgba(46,204,113,.12);
    color: #27ae60;
}

/* ── Contact Form ── */
.qc-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.qc-form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.qc-form-group.span-2 { grid-column: span 2; }
.qc-form-label {
    font-size: .75rem;
    font-weight: 700;
    color: #1a1a2e;
    letter-spacing: .2px;
}
.qc-form-label .req { color: #e63329; }
.qc-form-input,
.qc-form-textarea {
    border: 2px solid #e8eaed;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: .85rem;
    color: #1a1a2e;
    background: #f8f9fa;
    transition: border-color .2s, background .2s;
    font-family: inherit;
    width: 100%;
    box-sizing: border-box;
}
.qc-form-input:focus,
.qc-form-textarea:focus {
    outline: none;
    border-color: #e63329;
    background: #fff;
}
.qc-form-input.has-error,
.qc-form-textarea.has-error { border-color: #e63329; background: #fff8f8; }
.qc-form-textarea { resize: vertical; min-height: 80px; }
.qc-privacy {
    grid-column: span 2;
    font-size: .72rem;
    color: #aaa;
    line-height: 1.5;
    margin-top: 4px;
}
.qc-privacy a { color: #e63329; text-decoration: none; }

/* ── Result Step ── */
.qc-result-hero {
    background: linear-gradient(135deg, #1a1a2e 0%, #2a2a4e 100%);
    border-radius: 14px;
    padding: 28px;
    text-align: center;
    margin-bottom: 20px;
}
.qc-result-badge {
    display: inline-block;
    background: rgba(46,204,113,.15);
    color: #2ecc71;
    font-size: .65rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 50px;
    margin-bottom: 12px;
}
.qc-result-amount {
    font-size: 2.8rem;
    font-weight: 900;
    color: #fff;
    line-height: 1;
    margin-bottom: 6px;
}
.qc-result-amount .qc-curr { font-size: 1.4rem; vertical-align: top; margin-top: 8px; display: inline-block; opacity: .7; }
.qc-result-note {
    font-size: .72rem;
    color: rgba(255,255,255,.4);
}
.qc-result-breakdown {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 16px;
    border: 1px solid #eee;
}
.qc-result-breakdown h4 {
    font-size: .7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: #aaa;
    margin: 0 0 14px 0;
}
.qc-breakdown-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 0;
    border-bottom: 1px solid #eee;
    font-size: .82rem;
}
.qc-breakdown-row:last-child { border-bottom: none; }
.qc-breakdown-label { color: #555; }
.qc-breakdown-val { font-weight: 700; color: #1a1a2e; }
.qc-breakdown-val.green { color: #27ae60; }
.qc-breakdown-val.orange { color: #e67e22; }
.qc-result-actions {
    display: flex;
    gap: 10px;
}
.qc-result-cta {
    flex: 1;
    padding: 13px;
    border-radius: 10px;
    font-size: .85rem;
    font-weight: 800;
    cursor: pointer;
    transition: all .2s;
    text-align: center;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: none;
}
.qc-result-cta--primary {
    background: #e63329;
    color: #fff;
}
.qc-result-cta--primary:hover { background: #c8261d; }
.qc-result-cta--secondary {
    background: #f0f2f5;
    color: #1a1a2e;
}
.qc-result-cta--secondary:hover { background: #e8eaed; }
.qc-result-email-note {
    font-size: .72rem;
    color: #bbb;
    text-align: center;
    margin-top: 10px;
}

/* ── Footer / Nav ── */
.qc-footer {
    padding: 14px 28px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    border-top: 1px solid #f0f2f5;
    background: #fff;
}
.qc-btn-back {
    background: #f0f2f5;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: .82rem;
    font-weight: 700;
    color: #555;
    cursor: pointer;
    transition: background .2s;
    display: flex;
    align-items: center;
    gap: 6px;
}
.qc-btn-back:hover { background: #e8eaed; }
.qc-btn-back:disabled { opacity: .3; cursor: default; }
.qc-btn-next {
    background: #e63329;
    border: none;
    border-radius: 8px;
    padding: 10px 24px;
    font-size: .82rem;
    font-weight: 800;
    color: #fff;
    cursor: pointer;
    transition: background .2s, transform .15s;
    display: flex;
    align-items: center;
    gap: 6px;
}
.qc-btn-next:hover { background: #c8261d; }
.qc-btn-next:active { transform: scale(.97); }
.qc-btn-next:disabled { background: #ccc; cursor: default; }
.qc-step-counter {
    font-size: .72rem;
    color: #bbb;
    font-weight: 700;
}

/* ── Trigger Button (navbar) ── */
.nav-quote-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: 2px solid #e63329;
    color: #e63329;
    border-radius: 8px;
    padding: 7px 16px;
    font-size: .82rem;
    font-weight: 800;
    cursor: pointer;
    transition: all .22s ease;
    text-decoration: none;
    white-space: nowrap;
    font-family: inherit;
}
.nav-quote-btn:hover {
    background: #e63329;
    color: #fff;
}
.nav-quote-btn svg { flex-shrink: 0; }

/* ── Spinner ── */
.qc-spinner {
    width: 18px;
    height: 18px;
    border: 2.5px solid rgba(255,255,255,.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: qcSpin .7s linear infinite;
    display: none;
}
@keyframes qcSpin { to { transform: rotate(360deg); } }
.qc-btn-next.loading .qc-spinner { display: block; }
.qc-btn-next.loading .qc-btn-label { display: none; }

/* ── Error message ── */
.qc-error-msg {
    display: none;
    background: #fff0ef;
    border: 1px solid #ffd5d3;
    color: #c0392b;
    font-size: .78rem;
    font-weight: 600;
    padding: 10px 14px;
    border-radius: 8px;
    margin-top: 12px;
}

/* ── Responsive ── */
@media (max-width: 540px) {
    .qc-modal { border-radius: 14px 14px 0 0; max-height: 96vh; }
    .qc-overlay { align-items: flex-end; padding: 0; }
    .qc-type-grid { grid-template-columns: 1fr; }
    .qc-features-grid { grid-template-columns: 1fr; }
    .qc-form-grid { grid-template-columns: 1fr; }
    .qc-form-group.span-2 { grid-column: span 1; }
    .qc-privacy { grid-column: span 1; }
    .qc-result-amount { font-size: 2.2rem; }
    .qc-header { padding: 18px 20px 16px; }
    .qc-body { padding: 16px 20px 20px; }
    .qc-progress { padding: 14px 20px 0; }
    .qc-live-bar { margin: 10px 20px 0; }
    .qc-footer { padding: 12px 20px 16px; }
}
