/* Multi-step "Get a Quote" widget, embedded in contact.html.
   Scoped entirely under .quote-widget so it can't leak into or collide with
   the rest of the site's styles. Adapted from the standalone quote-form.html
   prototype Thomas built and Al reviewed by video. */

.quote-widget {
    --qw-navy: #1B3A6B;
    --qw-gold: #D4A537;
    --qw-text-muted: #6b7280;
    --qw-text-faint: #98a2b3;
    --qw-border: #e4e7ed;
    --qw-card-bg: #ffffff;
    --qw-selected-bg: #f2f4f8;
    --qw-btn-slate: #7c8ba6;
    --qw-btn-slate-hover: #6c7b96;
    --qw-error: #c0392b;

    width: 100%;
    max-width: 460px;
    margin: 0 auto;
    background: var(--qw-card-bg);
    border-radius: 22px;
    box-shadow: 0 20px 45px rgba(27, 58, 107, 0.10);
    position: relative;
    overflow: hidden;
}
.quote-widget .progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 5px;
    width: 16.6%;
    background: var(--qw-gold);
    border-radius: 22px 0 0 0;
    transition: width 0.35s ease;
    z-index: 2;
}
.quote-widget .card-body {
    padding: 40px 34px 34px;
    position: relative;
    min-height: 340px;
    display: flex;
    flex-direction: column;
}
.quote-widget .back-btn {
    background: none;
    border: none;
    color: var(--qw-text-faint);
    font-size: 14px;
    display: none;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    padding: 0;
    margin-bottom: 18px;
    align-self: flex-start;
    transition: color 0.15s;
}
.quote-widget .back-btn:hover { color: var(--qw-navy); }
.quote-widget .back-btn svg { width: 15px; height: 15px; }
.quote-widget .step {
    display: none;
    flex-direction: column;
    gap: 14px;
    animation: qwFadeIn 0.3s ease;
}
.quote-widget .step.active { display: flex; }
@keyframes qwFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}
.quote-widget .step-heading {
    font-size: 22px;
    font-weight: 700;
    color: var(--qw-navy);
    margin: 0 0 2px;
    line-height: 1.3;
    font-family: var(--font-sans);
}
.quote-widget .step-sub {
    font-size: 14px;
    color: var(--qw-text-muted);
    margin: 0 0 8px;
}
.quote-widget .option-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.quote-widget .option-btn {
    text-align: left;
    padding: 15px 18px;
    border: 1px solid var(--qw-border);
    border-radius: 10px;
    background: #fff;
    font-size: 15px;
    font-weight: 500;
    color: var(--qw-navy);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    font-family: inherit;
}
.quote-widget .option-btn:hover {
    border-color: #c6ccd8;
}
.quote-widget .option-btn.selected {
    background: var(--qw-selected-bg);
    border: 1.5px solid var(--qw-navy);
    font-weight: 600;
}
.quote-widget .field-label {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--qw-navy);
}
.quote-widget .field-label .field-label-sub {
    font-weight: 400;
    color: var(--qw-text-muted);
}
.quote-widget input[type="text"],
.quote-widget input[type="tel"],
.quote-widget input[type="email"],
.quote-widget textarea {
    width: 100%;
    padding: 13px 16px;
    border: 1px solid var(--qw-border);
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    color: var(--qw-navy);
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    margin-top: -4px;
    resize: vertical;
}
.quote-widget input::placeholder, .quote-widget textarea::placeholder { color: #a7aebb; }
.quote-widget input:focus, .quote-widget textarea:focus {
    border-color: var(--qw-gold);
    box-shadow: 0 0 0 3px rgba(212, 165, 55, 0.18);
}
.quote-widget .location-row {
    display: flex;
    justify-content: flex-end;
    margin-top: 4px;
}
.quote-widget .btn-slate {
    background: var(--qw-btn-slate);
    color: #fff;
    border: none;
    padding: 12px 26px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    font-family: inherit;
}
.quote-widget .btn-slate:hover { background: var(--qw-btn-slate-hover); }
.quote-widget .btn-slate:active { transform: scale(0.98); }
.quote-widget .btn-slate:disabled { background: #c3cad6; cursor: not-allowed; }
.quote-widget .btn-slate.full { width: 100%; margin-top: 6px; }
.quote-widget .upload-zone {
    border: 1.5px dashed #c7cede;
    border-radius: 12px;
    padding: 26px;
    text-align: center;
    color: var(--qw-text-muted);
    font-size: 13.5px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.quote-widget .upload-zone:hover, .quote-widget .upload-zone.dragover {
    border-color: var(--qw-gold);
    background: #fffdf7;
}
.quote-widget .upload-zone.has-file {
    border-color: var(--qw-navy);
    color: var(--qw-navy);
    font-weight: 500;
}
.quote-widget .upload-zone svg { width: 26px; height: 26px; color: #a7aebb; }
.quote-widget .upload-zone.has-file svg { color: var(--qw-navy); }
.quote-widget .upload-preview {
    max-width: 100%;
    max-height: 120px;
    border-radius: 8px;
    margin-top: 4px;
}
.quote-widget .field-error {
    font-size: 13px;
    color: var(--qw-error);
    margin-top: -4px;
    display: none;
}
.quote-widget .honeypot-field {
    position: absolute;
    left: -9999px;
    top: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
.quote-widget .confirmation {
    display: none;
    flex-direction: column;
    align-items: center;
    text-align: center;
    justify-content: center;
    min-height: 280px;
    gap: 14px;
}
.quote-widget .confirmation.active { display: flex; }
.quote-widget .confirmation svg { width: 48px; height: 48px; color: var(--qw-gold); }
.quote-widget .confirmation h2 { color: var(--qw-navy); font-size: 20px; margin: 0; font-weight: 700; font-family: var(--font-sans); }
.quote-widget .confirmation p { color: var(--qw-text-muted); font-size: 14.5px; margin: 0; max-width: 300px; }
.quote-widget .submit-error {
    display: none;
    background: #fdecea;
    color: var(--qw-error);
    border: 1px solid #f5c6cb;
    padding: 11px 14px;
    border-radius: 10px;
    font-size: 13.5px;
}
.quote-widget .spinner {
    width: 15px; height: 15px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: qwSpin 0.7s linear infinite;
    display: inline-block;
    vertical-align: -3px;
    margin-right: 6px;
}
@keyframes qwSpin { to { transform: rotate(360deg); } }
