/* ========================================
   FRATELLI PROMO PLUGIN — Frontend Styles
   ======================================== */

/* ------------------------------------------
   CSS Custom Properties (overridden by PHP)
   ------------------------------------------ */
:root {
    --qm-primary: #dc2626;
    --qm-primary-dark: #b91c1c;
    --qm-launcher-text: #ffffff;
    --qm-bg-dark: #111827;
    --qm-bg-header: #dc2626;
    --qm-header-text: #ffffff;
    --qm-text-white: #ffffff;
    --qm-border-radius: 16px;
    --qm-z-index: 10000;
}

/* ------------------------------------------
   Resets (scoped to plugin)
   ------------------------------------------ */
#nvp-deal-finder-app * {
    box-sizing: border-box;
    font-family: var(--qm-font-body);
}

#nvp-deal-finder-app button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
    padding: 0;
}

#nvp-deal-finder-app .qm-launcher__text {
    font-family: var(--qm-font-heading);
}

/* ------------------------------------------
   Launcher (floating button)
   ------------------------------------------ */
#nvp-deal-finder-app .qm-launcher {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--qm-primary);
    background: linear-gradient(
        135deg,
        color-mix(in srgb, var(--qm-primary) 85%, #fff) 0%,
        var(--qm-primary) 50%,
        color-mix(in srgb, var(--qm-primary) 85%, #000) 100%
    );
    color: var(--qm-launcher-text);
    padding: 14px 10px 14px 22px;
    border-radius: 50px;
    box-shadow:
        0 6px 24px rgba(0, 0, 0, 0.3),
        0 2px 8px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 17px;
    z-index: var(--qm-z-index);
    transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
    border: none;
}

#nvp-deal-finder-app .qm-launcher:hover {
    transform: translateY(-3px);
    filter: brightness(1.1);
    box-shadow:
        0 10px 35px rgba(0, 0, 0, 0.35),
        0 4px 12px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

#nvp-deal-finder-app .qm-launcher__badge {
    background: var(--qm-launcher-text);
    color: var(--qm-primary);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
}

/* --- Left position variant --- */
#nvp-deal-finder-app.qm-pos-left .qm-launcher {
    right: auto;
    left: 24px;
}

/* ------------------------------------------
   Backdrop
   ------------------------------------------ */
.qm-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    z-index: var(--qm-z-index);
}

.qm-backdrop.qm-open {
    opacity: 1;
    pointer-events: auto;
}

/* ------------------------------------------
   Widget Wrapper
   ------------------------------------------ */
.qm-widget-wrapper {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 836px;
    height: 596px;
    display: flex;
    flex-direction: row;
    gap: 24px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: calc(var(--qm-z-index) + 1);
}

.qm-widget-wrapper.qm-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.qm-widget-wrapper.qm-no-video {
    width: 440px;
}

/* --- Left position variant --- */
#nvp-deal-finder-app.qm-pos-left .qm-widget-wrapper {
    right: auto;
    left: 24px;
    flex-direction: row-reverse;
}

/* ------------------------------------------
   Left Column (Video)
   ------------------------------------------ */
.qm-col-left {
    width: 400px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    aspect-ratio: 1 / 1;
    max-height: 100%;
    align-self: center;
}

.qm-video-container {
    width: 100%;
    height: 100%;
    border-radius: var(--qm-border-radius);
    overflow: hidden;
    position: relative;
    background: #000;
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.05);
}

.qm-advisor-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.qm-video-controls {
    position: absolute;
    bottom: 20px;
    left: 20px;
    z-index: 10;
}

.qm-volume-btn {
    width: 44px;
    height: 44px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    transition: background 0.2s;
}

.qm-volume-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* ------------------------------------------
   Right Column (Content Panel)
   ------------------------------------------ */
.qm-col-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--qm-bg-dark);
    background: linear-gradient(
        180deg,
        var(--qm-bg-dark) 0%,
        color-mix(in srgb, var(--qm-bg-dark) 92%, #000) 100%
    );
    border-radius: var(--qm-border-radius);
    overflow: hidden;
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.05);
}

/* ------------------------------------------
   Header
   ------------------------------------------ */
#nvp-deal-finder-app .qm-header {
    background: var(--qm-bg-header);
    background: linear-gradient(
        135deg,
        color-mix(in srgb, var(--qm-bg-header) 90%, #fff) 0%,
        var(--qm-bg-header) 40%,
        color-mix(in srgb, var(--qm-bg-header) 90%, #000) 100%
    );
    height: 72px;
    padding: 0 20px;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 12px;
    color: var(--qm-header-text);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    position: relative;
    z-index: 2;
    flex-wrap: nowrap;
}

.qm-header-content {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-right: 48px;
}

.qm-header-title {
    font-family: var(--qm-font-heading);
    font-weight: 700;
    font-size: 18px;
}

.qm-brand-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

#nvp-deal-finder-app .qm-btn-close {
    color: var(--qm-header-text) !important;
    opacity: 0.7;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px;
    min-height: 36px;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border-radius: 8px !important;
    transition: all 0.2s;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    line-height: 1;
    position: absolute !important;
    top: 50%;
    right: 18px;
    transform: translateY(-50%);
    z-index: 5;
    cursor: pointer !important;
}

#nvp-deal-finder-app .qm-btn-close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.2) !important;
}

#nvp-deal-finder-app .qm-btn-close svg {
    width: 20px !important;
    height: 20px !important;
    display: block;
}

/* ------------------------------------------
   Body
   ------------------------------------------ */
.qm-body-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    scrollbar-width: thin;
    scrollbar-color: #4b5563 transparent;
    color: var(--qm-text-white);
}

/* ------------------------------------------
   Mobile
   ------------------------------------------ */
/* ------------------------------------------
   MOBILE RESPONSIVE
   ------------------------------------------ */
@media (max-width: 768px) {

    /* Widget: 88vh tall, centered horizontally */
    .qm-widget-wrapper {
        width: 92% !important;
        height: 88vh !important;
        top: 6vh !important;
        left: 4% !important;
        right: 4% !important;
        bottom: auto !important;
        transform: none;
        border-radius: 16px;
        flex-direction: column !important;
        gap: 0;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
        overflow: hidden;
    }

    .qm-widget-wrapper.qm-open {
        transform: none;
    }

    .qm-widget-wrapper.qm-no-video {
        width: 92% !important;
    }

    #nvp-deal-finder-app.qm-pos-left .qm-widget-wrapper {
        left: 4% !important;
        right: 4% !important;
        flex-direction: column !important;
    }

    /* Video column: 40% of widget height */
    .qm-col-left {
        width: 100%;
        flex: 0 0 40%;
        height: 40%;
        aspect-ratio: unset;
        max-height: none;
        align-self: stretch;
        border-radius: 0;
        overflow: hidden;
    }

    .qm-col-left .qm-video-container {
        border-radius: 0;
    }

    .qm-advisor-video {
        object-fit: cover;
    }

    /* Content column: 60%, scrolls internally */
    .qm-col-right {
        flex: 0 0 60%;
        height: 60%;
        min-height: 0;
        border-radius: 0;
        margin-top: 0;
        box-shadow: none;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }

    .qm-no-video .qm-col-right {
        flex: 1;
        height: 100%;
        border-radius: 0;
        margin-top: 0;
    }

    /* Header: compact */
    #nvp-deal-finder-app .qm-header {
        height: 60px;
        padding: 0 16px;
    }

    .qm-header-content {
        padding-right: 40px;
    }

    .qm-header-title {
        font-size: 16px;
    }

    .qm-header-step {
        font-size: 11px;
    }

    .qm-header-timer {
        font-size: 11px;
        padding: 2px 8px;
    }

    .qm-brand-icon {
        width: 34px;
        height: 34px;
        border-radius: 8px;
    }

    #nvp-deal-finder-app .qm-btn-close {
        width: 32px !important;
        height: 32px !important;
        min-width: 32px;
        min-height: 32px;
        right: 14px;
    }

    /* Body: tighter padding */
    .qm-body-scroll {
        padding: 16px;
    }

    /* Chat bubble: compact */
    .qm-chat-row {
        margin-bottom: 14px;
        gap: 8px;
    }

    .qm-chat-avatar {
        width: 32px;
        height: 32px;
    }

    .qm-chat-avatar svg {
        width: 16px;
        height: 16px;
    }

    .qm-chat-bubble {
        padding: 10px 14px;
        font-size: 13px;
        max-width: calc(100% - 44px);
    }

    /* Options: tighter */
    .qm-options-grid {
        gap: 8px;
        margin-bottom: 12px;
    }

    #nvp-deal-finder-app .qm-option-btn {
        padding: 10px 14px;
        border-radius: 10px;
        font-size: 14px;
        gap: 10px;
    }

    .qm-option-thumb {
        width: 60px;
        height: 60px;
        border-radius: 8px;
    }

    .qm-option-label {
        font-size: 14px;
    }

    .qm-option-subtitle {
        font-size: 12px;
    }

    #nvp-deal-finder-app .qm-option-btn .qm-option-radio {
        width: 22px;
        height: 22px;
    }

    /* Pills: wrap tighter */
    .qm-options-grid--pills {
        gap: 6px;
    }

    #nvp-deal-finder-app .qm-pill-btn {
        padding: 8px 14px;
        font-size: 12px;
    }

    /* Grid: single column on mobile */
    .qm-options-grid--2col {
        grid-template-columns: 1fr;
    }

    /* Form fields: compact */
    .qm-form-group {
        margin-bottom: 10px;
    }

    .qm-form-label {
        font-size: 12px;
        margin-bottom: 6px;
    }

    #nvp-deal-finder-app .qm-form-input {
        padding: 10px 12px;
        font-size: 14px;
        border-radius: 8px;
    }

    /* Consent toggle */
    .qm-consent-toggle {
        gap: 10px;
        font-size: 12px;
    }

    .qm-toggle-track {
        width: 38px;
        height: 22px;
    }

    .qm-toggle-thumb {
        width: 16px;
        height: 16px;
    }

    .qm-consent-toggle input:checked + .qm-toggle-track .qm-toggle-thumb {
        transform: translateX(16px);
    }

    /* Back button */
    #nvp-deal-finder-app .qm-back-btn-outline {
        padding: 10px 18px !important;
        font-size: 13px;
    }

    /* Footer: compact */
    .qm-footer {
        padding: 12px 16px 16px;
    }

    #nvp-deal-finder-app .qm-footer-btn {
        padding: 14px 20px !important;
        font-size: 15px;
        border-radius: 10px;
    }

    /* Success screen */
    .qm-success {
        padding: 30px 16px;
    }

    .qm-success-icon svg {
        width: 48px;
        height: 48px;
    }

    .qm-success-title {
        font-size: 20px;
    }

    .qm-success-text {
        font-size: 13px;
    }

    /* Launcher: centered on mobile */
    #nvp-deal-finder-app .qm-launcher {
        bottom: 16px;
        right: auto !important;
        left: 50% !important;
        transform: translateX(-50%);
        padding: 10px 8px 10px 16px;
        font-size: 14px;
        gap: 8px;
    }

    #nvp-deal-finder-app .qm-launcher:hover {
        transform: translateX(-50%) translateY(-3px);
    }

    #nvp-deal-finder-app.qm-pos-left .qm-launcher {
        right: auto !important;
        left: 50% !important;
    }

    #nvp-deal-finder-app .qm-launcher__flash {
        padding: 6px 10px;
        font-size: 10px;
        gap: 4px;
    }

    .qm-launcher__flash-timer {
        font-size: 9px;
        padding: 2px 6px;
    }

    #nvp-deal-finder-app .qm-launcher__dot {
        width: 8px;
        height: 8px;
    }

    /* Nav buttons */
    .qm-nav {
        margin-top: 14px;
        padding-top: 12px;
    }

    #nvp-deal-finder-app .qm-nav-btn {
        padding: 10px 16px !important;
        font-size: 13px;
    }

    /* Detail card */
    .qm-detail-card__image {
        width: 160px;
        max-height: 110px;
    }

    .qm-detail-card__price {
        font-size: 16px;
        padding: 5px 16px;
    }

    .qm-detail-card__heading {
        font-size: 18px;
    }

    .qm-detail-card__features li {
        padding: 8px 10px;
        font-size: 13px;
    }
}

/* ------------------------------------------
   Progress Bar
   ------------------------------------------ */
.qm-progress {
    margin-bottom: 24px;
}

.qm-progress-bar {
    height: 6px;
    background: rgba(128, 128, 128, 0.2);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 10px;
}

.qm-progress-fill {
    height: 100%;
    background: var(--qm-primary);
    border-radius: 6px;
    transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.qm-progress-text {
    font-size: 11px;
    opacity: 0.45;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

/* ------------------------------------------
   Question Label
   ------------------------------------------ */
.qm-question-label {
    font-family: var(--qm-font-heading);
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 8px;
    line-height: 1.3;
    color: var(--qm-text-white);
}

.qm-question-hint {
    font-size: 13px;
    opacity: 0.45;
    margin: 0 0 20px;
    font-weight: 500;
}

/* ------------------------------------------
   Option Buttons (contrast-safe)
   ------------------------------------------ */
.qm-options-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

#nvp-deal-finder-app .qm-option-btn {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    text-align: left;
    padding: 14px 18px;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.04) 0%,
        rgba(255, 255, 255, 0.01) 100%
    ) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 12px;
    color: var(--qm-text-white) !important;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    letter-spacing: 0.01em;
    backdrop-filter: blur(4px);
}

/* Radio circle on the right */
#nvp-deal-finder-app .qm-option-btn .qm-option-radio {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 2px solid rgba(128, 128, 128, 0.3);
    flex-shrink: 0;
    transition: all 0.2s ease;
    margin-left: auto;
}

#nvp-deal-finder-app .qm-option-btn:hover {
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.08) 0%,
        rgba(255, 255, 255, 0.03) 100%
    ) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

#nvp-deal-finder-app .qm-option-btn.qm-selected {
    background: var(--qm-primary) !important;
    background: linear-gradient(
        135deg,
        color-mix(in srgb, var(--qm-primary) 85%, #fff) 0%,
        var(--qm-primary) 50%,
        color-mix(in srgb, var(--qm-primary) 85%, #000) 100%
    ) !important;
    border-color: var(--qm-primary) !important;
    color: var(--qm-launcher-text) !important;
    box-shadow:
        0 6px 20px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

#nvp-deal-finder-app .qm-option-btn.qm-selected .qm-option-radio {
    border-color: var(--qm-launcher-text);
    background: var(--qm-launcher-text);
    box-shadow: inset 0 0 0 4px var(--qm-primary);
}

.qm-option-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.qm-option-label {
    font-family: var(--qm-font-heading);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
}

.qm-option-subtitle {
    font-size: 13px;
    font-weight: 400;
    opacity: 0.55;
    line-height: 1.3;
}

/* ------------------------------------------
   Image Option — Horizontal row
   ------------------------------------------ */
.qm-options-grid--images {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#nvp-deal-finder-app .qm-option-btn--has-image {
    flex-direction: row;
    align-items: center;
    gap: 14px;
    padding: 12px 18px 12px 12px;
    overflow: hidden;
    text-align: left;
}

.qm-option-thumb {
    width: 76px;
    height: 76px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
}

.qm-option-thumb img {
    width: 88%;
    height: 88%;
    object-fit: contain;
    display: block;
    transition: transform 0.3s ease;
}

#nvp-deal-finder-app .qm-option-btn--has-image:hover .qm-option-thumb img {
    transform: scale(1.05);
}

#nvp-deal-finder-app .qm-option-btn--has-image .qm-option-text {
    flex: 1;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
}

/* ------------------------------------------
   Admin: Option row image controls
   ------------------------------------------ */
.qm-option-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    flex-wrap: wrap;
}

.qm-opt-divider {
    width: 1px;
    height: 24px;
    background: #ddd;
    margin: 0 4px;
}

.qm-img-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

.qm-img-toggle input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 0;
    height: 0;
    position: absolute;
    opacity: 0;
}

.qm-opt-img-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}

.qm-opt-img-controls .qm-icon-preview {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #ddd;
    background: #f7f7f7;
}

.qm-opt-img-controls .qm-icon-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Admin: Frontend preview image list */
.qm-fp-options--grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.qm-fp-option--image {
    flex-direction: row;
    align-items: center;
    padding: 6px 10px !important;
    gap: 10px;
}

.qm-fp-option--image .qm-fp-option-thumb {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 6px;
    background: #fff;
}

.qm-fp-option--image .qm-fp-option-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.qm-fp-option--image span {
    font-size: 12px;
    font-weight: 600;
}

/* Admin: Size override controls */
.qm-size-label {
    font-size: 11px;
    font-weight: 600;
    color: #666;
    white-space: nowrap;
}

.qm-opt-size-input {
    width: 54px !important;
    min-width: 54px;
    padding: 3px 6px !important;
    font-size: 12px !important;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    -moz-appearance: textfield;
    appearance: textfield;
}

.qm-opt-size-input::-webkit-inner-spin-button,
.qm-opt-size-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.qm-opt-size-input:focus {
    border-color: #0073aa;
    outline: none;
}

.qm-size-x {
    font-size: 12px;
    color: #999;
    margin: 0 2px;
}

.qm-size-unit {
    font-size: 11px;
    color: #999;
}

/* Admin: Frontend preview — custom-sized thumb */
.qm-fp-option--image .qm-fp-option-thumb.qm-fp-option-thumb--sized {
    width: auto;
    height: auto;
    aspect-ratio: unset;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
}

.qm-fp-option-thumb--sized img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ------------------------------------------
   Frontend: Custom-sized thumbnail
   ------------------------------------------ */
.qm-option-thumb.qm-option-thumb--sized {
    aspect-ratio: unset !important;
    width: auto !important;
    flex-shrink: 0;
    border-radius: 8px !important;
    overflow: hidden;
    background: rgba(128, 128, 128, 0.08);
    margin: 0 auto;
}

.qm-option-thumb--sized img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    display: block;
}

/* ------------------------------------------
   Navigation
   ------------------------------------------ */
.qm-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid rgba(128, 128, 128, 0.12);
    gap: 12px;
}

#nvp-deal-finder-app .qm-nav-btn {
    padding: 12px 24px !important;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    letter-spacing: 0.02em;
}

#nvp-deal-finder-app .qm-nav-back {
    background: rgba(128, 128, 128, 0.1) !important;
    color: var(--qm-text-white) !important;
    border: 2px solid rgba(128, 128, 128, 0.2) !important;
}

#nvp-deal-finder-app .qm-nav-back:hover {
    background: rgba(128, 128, 128, 0.18) !important;
    border-color: rgba(128, 128, 128, 0.3) !important;
    transform: translateY(-1px);
}

#nvp-deal-finder-app .qm-nav-next,
#nvp-deal-finder-app .qm-nav-submit {
    background: var(--qm-primary) !important;
    color: var(--qm-launcher-text) !important;
    border: none !important;
    margin-left: auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

#nvp-deal-finder-app .qm-nav-next:hover,
#nvp-deal-finder-app .qm-nav-submit:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

#nvp-deal-finder-app .qm-nav-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ------------------------------------------
   Contact Form
   ------------------------------------------ */
.qm-contact-form {
    display: flex;
    flex-direction: column;
}

.qm-form-group {
    margin-bottom: 14px;
}

#nvp-deal-finder-app .qm-autogrow {
    resize: none;
    overflow: hidden;
    min-height: 42px;
    max-height: 120px;
    transition: height 0.15s ease;
}

.qm-form-label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--qm-text-white);
    letter-spacing: 0.02em;
}

.qm-optional {
    font-weight: 400;
    opacity: 0.4;
}

#nvp-deal-finder-app .qm-form-input {
    width: 100%;
    padding: 14px 16px;
    border-radius: 10px;
    border: 2px solid rgba(128, 128, 128, 0.2);
    background: rgba(128, 128, 128, 0.06);
    color: var(--qm-text-white);
    font-size: 15px;
    font-weight: 500;
    font-family: inherit;
    outline: none;
    transition: all 0.2s ease;
}

#nvp-deal-finder-app .qm-form-input::placeholder {
    color: rgba(128, 128, 128, 0.5);
}

#nvp-deal-finder-app .qm-form-input:focus {
    border-color: var(--qm-primary);
    background: rgba(128, 128, 128, 0.04);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}

.qm-form-error {
    background: rgba(220, 38, 38, 0.12);
    border: 1px solid rgba(220, 38, 38, 0.25);
    color: #fca5a5;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 14px;
}

/* ------------------------------------------
   Success Screen
   ------------------------------------------ */
.qm-success {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 20px;
    flex: 1;
    animation: qmFadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.qm-success-icon {
    color: #22c55e;
    margin-bottom: 20px;
    animation: qmPop 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

.qm-success-title {
    font-family: var(--qm-font-heading);
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 12px;
    color: var(--qm-text-white);
}

.qm-success-text {
    font-size: 14px;
    opacity: 0.5;
    margin: 0 0 28px;
    max-width: 280px;
    line-height: 1.6;
}

@keyframes qmFadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes qmPop {
    from {
        opacity: 0;
        transform: scale(0.5);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ------------------------------------------
   Consent toggle
   ------------------------------------------ */
.qm-consent-group {
    margin-top: 0;
    margin-bottom: 14px;
}

.qm-consent-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 13px;
    line-height: 1.4;
    color: var(--qm-text-white);
    user-select: none;
}

.qm-consent-toggle input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.qm-toggle-track {
    position: relative;
    width: 44px;
    height: 24px;
    background: rgba(128, 128, 128, 0.25);
    border-radius: 12px;
    flex-shrink: 0;
    transition: background 0.2s;
}

.qm-toggle-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.qm-consent-toggle input:checked + .qm-toggle-track {
    background: var(--qm-primary);
}

.qm-consent-toggle input:checked + .qm-toggle-track .qm-toggle-thumb {
    transform: translateX(20px);
}

.qm-consent-text {
    opacity: 0.7;
    font-weight: 500;
}

/* ==========================================
   PROTOTYPE MATCH — New component styles
   ========================================== */

/* ------------------------------------------
   Header: Step counter + Timer
   ------------------------------------------ */
.qm-header-step {
    font-size: 12px;
    font-weight: 500;
    opacity: 0.8;
    display: block;
    margin-top: 2px;
}

.qm-header-timer {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.2);
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    margin-left: 10px;
    letter-spacing: 0.5px;
    vertical-align: middle;
}

.qm-header-timer-label {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.8px;
    opacity: 0.9;
    text-transform: uppercase;
}

.qm-header-timer-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    vertical-align: middle;
    margin-right: 3px;
}

.qm-header-timer-icon svg {
    width: 14px;
    height: 14px;
    fill: #fff;
    display: block;
}

/* ------------------------------------------
   Chat Bubble question labels
   ------------------------------------------ */
.qm-chat-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 20px;
}

.qm-chat-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--qm-primary);
    background: linear-gradient(
        135deg,
        color-mix(in srgb, var(--qm-primary) 80%, #fff) 0%,
        var(--qm-primary) 60%,
        color-mix(in srgb, var(--qm-primary) 80%, #000) 100%
    );
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.2);
}

.qm-chat-avatar svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: #fff;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.qm-chat-bubble {
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.06) 0%,
        rgba(255, 255, 255, 0.02) 100%
    );
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px 16px 16px 4px;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--qm-text-white);
    max-width: calc(100% - 55px);
    backdrop-filter: blur(4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* ------------------------------------------
   Pill / Chip layout for options
   ------------------------------------------ */
.qm-options-grid--pills {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

#nvp-deal-finder-app .qm-pill-btn {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    border-radius: 50px;
    background: rgba(128, 128, 128, 0.08) !important;
    border: 2px solid rgba(128, 128, 128, 0.2) !important;
    color: var(--qm-text-white) !important;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
}

#nvp-deal-finder-app .qm-pill-btn:hover {
    background: rgba(128, 128, 128, 0.16) !important;
    border-color: rgba(128, 128, 128, 0.35) !important;
    transform: translateY(-1px);
}

#nvp-deal-finder-app .qm-pill-btn.qm-selected {
    background: var(--qm-primary) !important;
    border-color: var(--qm-primary) !important;
    color: #fff !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* ------------------------------------------
   Two-column grid for spec cards
   ------------------------------------------ */
.qm-options-grid--2col {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 24px;
}

#nvp-deal-finder-app .qm-spec-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 14px;
    background: rgba(128, 128, 128, 0.08) !important;
    border: 2px solid rgba(128, 128, 128, 0.18) !important;
    border-radius: 12px;
    color: var(--qm-text-white) !important;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    text-align: left;
    min-height: 100px;
}

#nvp-deal-finder-app .qm-spec-card:hover {
    background: rgba(128, 128, 128, 0.14) !important;
    border-color: rgba(128, 128, 128, 0.3) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

#nvp-deal-finder-app .qm-spec-card.qm-selected {
    background: var(--qm-primary) !important;
    border-color: var(--qm-primary) !important;
    color: #fff !important;
}

.qm-spec-card__price {
    position: absolute;
    top: -1px;
    right: -1px;
    background: var(--qm-primary);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 0 10px 0 10px;
    letter-spacing: 0.3px;
}

.qm-spec-card__title {
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 4px;
    padding-right: 60px;
}

.qm-spec-card__subtitle {
    font-size: 11px;
    opacity: 0.6;
    margin: 0 0 8px;
    line-height: 1.3;
}

.qm-spec-card__link {
    font-size: 11px;
    color: var(--qm-primary) !important;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: auto;
}

#nvp-deal-finder-app .qm-spec-card.qm-selected .qm-spec-card__link {
    color: rgba(255, 255, 255, 0.85) !important;
}

.qm-spec-card__link::before {
    content: '📋';
    font-size: 12px;
}

/* Mobile: stack grid to 1 column */
/* Grid single-col on mobile handled in main responsive block above */

/* ------------------------------------------
   Detail / Preview Card
   ------------------------------------------ */
.qm-detail-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    animation: qmFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.qm-detail-card__image {
    width: 200px;
    max-height: 140px;
    object-fit: contain;
    margin-bottom: 16px;
    border-radius: 8px;
}

.qm-detail-card__price {
    display: inline-block;
    background: var(--qm-primary);
    color: #fff;
    font-size: 18px;
    font-weight: 800;
    padding: 6px 20px;
    border-radius: 50px;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}

.qm-detail-card__heading {
    font-family: var(--qm-font-heading);
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 6px;
    color: var(--qm-text-white);
}

.qm-detail-card__subtitle {
    font-size: 13px;
    opacity: 0.5;
    margin: 0 0 16px;
}

.qm-detail-card__features {
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
    width: 100%;
    text-align: left;
}

.qm-detail-card__features li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(128, 128, 128, 0.1);
    font-size: 14px;
    color: var(--qm-text-white);
}

.qm-detail-card__features li::before {
    content: '✓';
    color: #22c55e;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
}

.qm-detail-card__link {
    font-size: 12px;
    color: var(--qm-primary) !important;
    text-decoration: none;
    opacity: 0.8;
    margin-top: 8px;
}

.qm-detail-card__link:hover {
    opacity: 1;
}

/* ------------------------------------------
   Launcher: Green dot
   ------------------------------------------ */
#nvp-deal-finder-app .qm-launcher__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #22c55e;
    flex-shrink: 0;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.6);
    animation: qmPulse 2s ease-in-out infinite;
}

@keyframes qmPulse {
    0%, 100% { box-shadow: 0 0 6px rgba(34, 197, 94, 0.4); }
    50% { box-shadow: 0 0 12px rgba(34, 197, 94, 0.8); }
}

/* ------------------------------------------
   Launcher: Flash Sale badge
   ------------------------------------------ */
#nvp-deal-finder-app .qm-launcher__flash {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 0, 0, 0.2);
    background: linear-gradient(
        135deg,
        color-mix(in srgb, var(--qm-primary) 60%, #ff6b9d) 0%,
        color-mix(in srgb, var(--qm-primary) 50%, #ff9a56) 100%
    );
    padding: 8px 14px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    white-space: nowrap;
    color: var(--qm-launcher-text);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

#nvp-deal-finder-app .qm-launcher__flash-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    opacity: 0.9;
}

#nvp-deal-finder-app .qm-launcher__flash-icon svg {
    width: 14px;
    height: 14px;
    fill: #fff;
}

.qm-launcher__flash-timer {
    background: rgba(0, 0, 0, 0.3);
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.8px;
    color: #fff;
}

/* ------------------------------------------
   Footer Bar
   ------------------------------------------ */
.qm-footer {
    padding: 16px 24px 20px;
    background: var(--qm-bg-dark);
    flex-shrink: 0;
}

#nvp-deal-finder-app .qm-footer-btn {
    width: 100%;
    padding: 16px 24px !important;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    letter-spacing: 0.02em;
    background: var(--qm-primary) !important;
    background: linear-gradient(
        135deg,
        color-mix(in srgb, var(--qm-primary) 85%, #fff) 0%,
        var(--qm-primary) 50%,
        color-mix(in srgb, var(--qm-primary) 80%, #000) 100%
    ) !important;
    color: var(--qm-launcher-text) !important;
    border: none !important;
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

#nvp-deal-finder-app .qm-footer-btn:hover:not(:disabled) {
    filter: brightness(1.12);
    transform: translateY(-2px);
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

#nvp-deal-finder-app .qm-footer-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
    filter: none;
    box-shadow: none;
}

/* ------------------------------------------
   Section labels for multi-question step
   ------------------------------------------ */
.qm-section-label {
    font-size: 13px;
    font-weight: 700;
    margin: 0 0 10px;
    color: var(--qm-text-white);
}

.qm-section-hint {
    font-size: 11px;
    font-weight: 500;
    opacity: 0.4;
    margin-left: 4px;
}

/* ------------------------------------------
   Contact form: enquiry type pills
   ------------------------------------------ */
.qm-enquiry-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

/* ------------------------------------------
   Back button (outline style in body)
   ------------------------------------------ */
#nvp-deal-finder-app .qm-back-btn-outline {
    width: 100%;
    padding: 12px 24px !important;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    background: rgba(128, 128, 128, 0.08) !important;
    border: 2px solid rgba(128, 128, 128, 0.18) !important;
    color: var(--qm-text-white) !important;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 8px;
}

#nvp-deal-finder-app .qm-back-btn-outline:hover {
    background: rgba(128, 128, 128, 0.14) !important;
    border-color: rgba(128, 128, 128, 0.3) !important;
}