/* ============================================================
   Mighty Quote v2 — Conversational multi-step form
   Mobile-first, premium UX, brand-accurate
   ============================================================ */

.mqv2 {
    --mqv2-navy: #0A1E5E;
    --mqv2-navy-deep: #061343;
    --mqv2-blue: #2563EB;
    --mqv2-blue-soft: #EFF4FF;
    --mqv2-ink: #0F172A;
    --mqv2-muted: #64748B;
    --mqv2-line: #E2E8F0;
    --mqv2-bg: #F8FAFC;
    --mqv2-white: #FFFFFF;
    --mqv2-success: #16A34A;
    --mqv2-warn: #F59E0B;
    --mqv2-error: #DC2626;
    --mqv2-radius: 14px;
    --mqv2-radius-sm: 10px;
    --mqv2-shadow-sm: 0 1px 2px rgba(15, 23, 42, .04), 0 1px 1px rgba(15, 23, 42, .03);
    --mqv2-shadow: 0 4px 14px -4px rgba(10, 30, 94, .12), 0 2px 6px -2px rgba(10, 30, 94, .08);
    --mqv2-shadow-lg: 0 18px 40px -16px rgba(10, 30, 94, .25), 0 6px 14px -6px rgba(10, 30, 94, .12);
    --mqv2-ease: cubic-bezier(.22, 1, .36, 1);

    position: relative;
    max-width: 880px;
    margin: 0 auto;
    color: var(--mqv2-ink);
    font-family: inherit;
}

/* ───────────── Progress bar ───────────── */
.mqv2__progress {
    position: sticky;
    top: 0;
    z-index: 5;
    background: var(--mqv2-bg);
    padding: 14px 4px 18px;
    margin: 0 -4px 20px;
}
.mqv2__progress-track {
    position: relative;
    height: 6px;
    background: var(--mqv2-line);
    border-radius: 999px;
    overflow: hidden;
}
.mqv2__progress-fill {
    position: absolute;
    inset: 0 auto 0 0;
    width: 20%;
    background: linear-gradient(90deg, var(--mqv2-blue), var(--mqv2-navy));
    border-radius: 999px;
    transition: width .5s var(--mqv2-ease);
}
.mqv2__progress-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    font-size: 13px;
    color: var(--mqv2-muted);
    font-weight: 500;
}
.mqv2__progress-step {
    color: var(--mqv2-navy);
    font-weight: 700;
}

/* ───────────── Step container ───────────── */
.mqv2__steps {
    position: relative;
    min-height: 420px;
}
.mqv2__step {
    display: none;
    animation: mqv2-in .45s var(--mqv2-ease) both;
}
.mqv2__step.is-active { display: block; }
.mqv2__step.is-leaving {
    display: block;
    animation: mqv2-out .25s var(--mqv2-ease) both;
}

@keyframes mqv2-in {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes mqv2-out {
    from { opacity: 1; transform: translateY(0); }
    to   { opacity: 0; transform: translateY(-10px); }
}

/* ───────────── Step header ───────────── */
.mqv2__head {
    margin-bottom: 28px;
}
.mqv2__eyebrow {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--mqv2-blue);
    margin-bottom: 10px;
}
.mqv2__title {
    font-size: clamp(26px, 3.4vw, 38px);
    line-height: 1.15;
    font-weight: 800;
    color: var(--mqv2-navy);
    margin: 0 0 10px;
    letter-spacing: -0.01em;
}
.mqv2__sub {
    font-size: 16px;
    color: var(--mqv2-muted);
    margin: 0;
    max-width: 56ch;
}

/* ───────────── Card grid (choice cards) ───────────── */
.mqv2__grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.mqv2__card {
    --c-accent: var(--mqv2-blue);
    position: relative;
    background: var(--mqv2-white);
    border: 1.5px solid var(--mqv2-line);
    border-radius: var(--mqv2-radius);
    padding: 20px 18px 18px;
    cursor: pointer;
    text-align: left;
    transition: transform .25s var(--mqv2-ease), box-shadow .25s var(--mqv2-ease), border-color .2s, background .2s;
    overflow: hidden;
    font: inherit;
    color: inherit;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 150px;
}
.mqv2__card:hover {
    border-color: var(--c-accent);
    box-shadow: var(--mqv2-shadow);
    transform: translateY(-2px);
}
.mqv2__card.is-selected {
    border-color: var(--mqv2-navy);
    background: linear-gradient(180deg, #fff 0%, var(--mqv2-blue-soft) 100%);
    box-shadow: var(--mqv2-shadow-lg);
}
.mqv2__card.is-selected::before {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 28px; height: 4px;
    background: var(--mqv2-blue);
    border-bottom-right-radius: 4px;
}
.mqv2__card-img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: contain;
    background: var(--mqv2-bg);
    border-radius: var(--mqv2-radius-sm);
}
.mqv2__card-label {
    font-weight: 700;
    font-size: 16px;
    color: var(--mqv2-navy);
    line-height: 1.25;
}
.mqv2__card-meta {
    font-size: 13px;
    color: var(--mqv2-muted);
    line-height: 1.4;
}
.mqv2__card-tick {
    position: absolute;
    top: 14px; right: 14px;
    width: 24px; height: 24px;
    border-radius: 50%;
    background: var(--mqv2-navy);
    color: #fff;
    display: none;
    align-items: center;
    justify-content: center;
}
.mqv2__card.is-selected .mqv2__card-tick { display: flex; }

/* ───────────── Roof shape SVG row ───────────── */
.mqv2__shape-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.mqv2__shape {
    background: var(--mqv2-white);
    border: 1.5px solid var(--mqv2-line);
    border-radius: var(--mqv2-radius);
    padding: 22px 20px;
    cursor: pointer;
    transition: transform .25s var(--mqv2-ease), box-shadow .25s var(--mqv2-ease), border-color .2s;
    text-align: center;
    font: inherit;
    color: inherit;
    width: 100%;
}
.mqv2__shape:hover {
    border-color: var(--mqv2-blue);
    box-shadow: var(--mqv2-shadow);
    transform: translateY(-2px);
}
.mqv2__shape.is-selected {
    border-color: var(--mqv2-navy);
    box-shadow: var(--mqv2-shadow-lg);
    background: linear-gradient(180deg, #fff 0%, var(--mqv2-blue-soft) 100%);
}
.mqv2__shape svg {
    width: 100%;
    height: auto;
    max-height: 110px;
}
.mqv2__shape-label {
    margin-top: 12px;
    font-weight: 700;
    color: var(--mqv2-navy);
    font-size: 16px;
}
.mqv2__shape-meta {
    font-size: 13px;
    color: var(--mqv2-muted);
    margin-top: 4px;
}

/* ───────────── Dimensions ───────────── */
.mqv2__dim-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 18px;
}
.mqv2__field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.mqv2__label {
    font-size: 13px;
    font-weight: 600;
    color: var(--mqv2-navy);
    letter-spacing: .01em;
}
.mqv2__hint {
    font-size: 12px;
    color: var(--mqv2-muted);
    margin-top: 2px;
}
.mqv2__input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.mqv2__input {
    width: 100%;
    background: var(--mqv2-white);
    border: 1.5px solid var(--mqv2-line);
    border-radius: var(--mqv2-radius-sm);
    padding: 14px 56px 14px 16px;
    font-size: 16px;
    color: var(--mqv2-ink);
    transition: border-color .2s, box-shadow .2s;
    font: inherit;
    font-weight: 500;
}
.mqv2__input:focus {
    outline: none;
    border-color: var(--mqv2-blue);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, .12);
}
.mqv2__input::placeholder { color: #94A3B8; }
.mqv2__suffix {
    position: absolute;
    right: 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--mqv2-muted);
    pointer-events: none;
}

/* checkbox row */
.mqv2__check {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    padding: 12px 14px;
    background: var(--mqv2-bg);
    border-radius: var(--mqv2-radius-sm);
    cursor: pointer;
    user-select: none;
}
.mqv2__check input { accent-color: var(--mqv2-navy); width: 18px; height: 18px; }
.mqv2__check span { font-size: 14px; color: var(--mqv2-ink); }

/* ───────────── Profile / colour picker (step 3) ───────────── */
.mqv2__product-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    margin-bottom: 18px;
}
@media (min-width: 720px) {
    .mqv2__product-row { grid-template-columns: 1.1fr 1fr; }
}
.mqv2__product-preview {
    background: var(--mqv2-white);
    border: 1.5px solid var(--mqv2-line);
    border-radius: var(--mqv2-radius);
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.mqv2__product-img {
    width: 100%;
    aspect-ratio: 4/3;
    background: var(--mqv2-bg);
    border-radius: var(--mqv2-radius-sm);
    object-fit: contain;
    transition: opacity .3s var(--mqv2-ease);
}
.mqv2__product-name {
    font-weight: 700;
    color: var(--mqv2-navy);
    font-size: 17px;
    line-height: 1.3;
}
.mqv2__product-price {
    font-size: 15px;
    color: var(--mqv2-muted);
}
.mqv2__product-price strong {
    color: var(--mqv2-navy);
    font-size: 18px;
    font-weight: 800;
}

.mqv2__select-stack {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.mqv2__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.mqv2__chip {
    background: var(--mqv2-white);
    border: 1.5px solid var(--mqv2-line);
    border-radius: 999px;
    padding: 9px 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--mqv2-ink);
    cursor: pointer;
    transition: all .2s var(--mqv2-ease);
    font-family: inherit;
}
.mqv2__chip:hover {
    border-color: var(--mqv2-blue);
    color: var(--mqv2-blue);
}
.mqv2__chip.is-selected {
    background: var(--mqv2-navy);
    border-color: var(--mqv2-navy);
    color: #fff;
}
.mqv2__chip[disabled] {
    opacity: .35;
    cursor: not-allowed;
    pointer-events: none;
}

/* ───────────── Live BOM card ───────────── */
.mqv2__bom {
    background: linear-gradient(180deg, var(--mqv2-navy) 0%, var(--mqv2-navy-deep) 100%);
    color: #fff;
    border-radius: var(--mqv2-radius);
    padding: 18px 20px;
    box-shadow: var(--mqv2-shadow-lg);
    margin-top: 18px;
}
.mqv2__bom-eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: rgba(255,255,255,.6);
    margin-bottom: 4px;
}
.mqv2__bom-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    font-size: 14px;
    padding: 6px 0;
}
.mqv2__bom-row + .mqv2__bom-row { border-top: 1px solid rgba(255,255,255,.08); }
.mqv2__bom-total {
    margin-top: 10px;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,.18);
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}
.mqv2__bom-total-label {
    font-size: 13px;
    color: rgba(255,255,255,.7);
}
.mqv2__bom-total-value {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -.01em;
}
.mqv2__bom-vat {
    font-size: 12px;
    color: rgba(255,255,255,.55);
    margin-top: 2px;
    text-align: right;
}

/* ───────────── Delivery / Contact ───────────── */
.mqv2__radio-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 18px;
}
.mqv2__radio {
    background: var(--mqv2-white);
    border: 1.5px solid var(--mqv2-line);
    border-radius: var(--mqv2-radius-sm);
    padding: 14px 16px;
    cursor: pointer;
    text-align: left;
    transition: all .2s var(--mqv2-ease);
    font: inherit;
}
.mqv2__radio:hover { border-color: var(--mqv2-blue); }
.mqv2__radio.is-selected {
    border-color: var(--mqv2-navy);
    background: var(--mqv2-blue-soft);
}
.mqv2__radio-title {
    font-weight: 700;
    color: var(--mqv2-navy);
    font-size: 15px;
}
.mqv2__radio-meta {
    font-size: 13px;
    color: var(--mqv2-muted);
    margin-top: 2px;
}

.mqv2__zone-info {
    margin-top: 14px;
    padding: 12px 14px;
    background: var(--mqv2-blue-soft);
    border-radius: var(--mqv2-radius-sm);
    font-size: 13px;
    color: var(--mqv2-navy);
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(37,99,235,.15);
}
.mqv2__zone-info--warn {
    background: #FEF3C7;
    color: #92400E;
    border-color: rgba(217,119,6,.25);
}

/* ───────────── Footer / nav buttons ───────────── */
.mqv2__nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 36px;
    padding-top: 24px;
    border-top: 1px solid var(--mqv2-line);
}
.mqv2__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 22px;
    border-radius: var(--mqv2-radius-sm);
    border: 1.5px solid transparent;
    background: transparent;
    cursor: pointer;
    font-weight: 700;
    font-size: 15px;
    line-height: 1;
    transition: all .2s var(--mqv2-ease);
    font-family: inherit;
    min-height: 50px;
}
.mqv2__btn--back {
    color: var(--mqv2-muted);
    background: transparent;
}
.mqv2__btn--back:hover { color: var(--mqv2-navy); }
.mqv2__btn--next {
    color: #fff;
    background: var(--mqv2-navy);
    box-shadow: 0 6px 18px -6px rgba(10, 30, 94, .45);
    padding: 14px 28px;
}
.mqv2__btn--next:hover {
    background: var(--mqv2-blue);
    transform: translateY(-1px);
    box-shadow: 0 10px 22px -8px rgba(37, 99, 235, .5);
}
.mqv2__btn--next:disabled {
    opacity: .4;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}
.mqv2__btn--ghost {
    color: var(--mqv2-navy);
    background: var(--mqv2-white);
    border-color: var(--mqv2-line);
}
.mqv2__btn--ghost:hover { border-color: var(--mqv2-navy); }
.mqv2__btn-arrow {
    transition: transform .2s var(--mqv2-ease);
}
.mqv2__btn--next:hover .mqv2__btn-arrow { transform: translateX(3px); }

/* ───────────── Review screen ───────────── */
.mqv2__review-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}
.mqv2__review-card {
    background: var(--mqv2-white);
    border: 1.5px solid var(--mqv2-line);
    border-radius: var(--mqv2-radius);
    padding: 18px 20px;
    position: relative;
}
.mqv2__review-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.mqv2__review-card-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--mqv2-blue);
}
.mqv2__review-edit {
    background: none;
    border: none;
    color: var(--mqv2-muted);
    font-size: 13px;
    cursor: pointer;
    font-weight: 600;
    text-decoration: underline;
    font-family: inherit;
}
.mqv2__review-edit:hover { color: var(--mqv2-navy); }
.mqv2__review-body {
    font-size: 15px;
    color: var(--mqv2-ink);
    line-height: 1.5;
}
.mqv2__review-body strong { color: var(--mqv2-navy); }

/* ───────────── Success screen ───────────── */
.mqv2__success {
    text-align: center;
    padding: 40px 20px;
    animation: mqv2-in .55s var(--mqv2-ease) both;
}
.mqv2__success-icon {
    width: 78px;
    height: 78px;
    margin: 0 auto 22px;
    background: var(--mqv2-success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 12px 32px -8px rgba(22, 163, 74, .4);
    animation: mqv2-pop .6s var(--mqv2-ease) both;
}
@keyframes mqv2-pop {
    0%   { transform: scale(.4); opacity: 0; }
    60%  { transform: scale(1.08); opacity: 1; }
    100% { transform: scale(1); }
}
.mqv2__success-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--mqv2-navy);
    margin: 0 0 10px;
}
.mqv2__success-sub {
    color: var(--mqv2-muted);
    margin: 0 0 18px;
    font-size: 16px;
}
.mqv2__success-quoteno {
    display: inline-block;
    background: var(--mqv2-blue-soft);
    color: var(--mqv2-navy);
    padding: 8px 16px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: .04em;
    margin-bottom: 24px;
}

/* ───────────── Validation / errors ───────────── */
.mqv2__error {
    background: #FEF2F2;
    border: 1px solid #FCA5A5;
    color: #991B1B;
    padding: 12px 14px;
    border-radius: var(--mqv2-radius-sm);
    font-size: 14px;
    margin-bottom: 16px;
    display: none;
}
.mqv2__error.is-visible { display: block; animation: mqv2-in .25s var(--mqv2-ease) both; }

.mqv2__loader {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: mqv2-spin .8s linear infinite;
    display: inline-block;
}
@keyframes mqv2-spin { to { transform: rotate(360deg); } }

/* ───────────── Skeleton on load ───────────── */
.mqv2__skeleton {
    background: linear-gradient(90deg, var(--mqv2-bg) 0%, #f1f5f9 50%, var(--mqv2-bg) 100%);
    background-size: 200% 100%;
    animation: mqv2-shimmer 1.4s ease-in-out infinite;
    border-radius: var(--mqv2-radius-sm);
}
@keyframes mqv2-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ───────────── Mobile ───────────── */
@media (max-width: 640px) {
    .mqv2__title { font-size: 24px; }
    .mqv2__shape-row { grid-template-columns: 1fr; }
    .mqv2__radio-row { grid-template-columns: 1fr; }
    .mqv2__btn { padding: 13px 18px; font-size: 14px; }
    .mqv2__btn--next { padding: 13px 22px; }
    .mqv2__nav { flex-direction: column-reverse; align-items: stretch; }
    .mqv2__nav .mqv2__btn { width: 100%; }
    .mqv2__progress { padding-top: 10px; }
}
