/* Fase 13 - Frontend UX flow. Scoped to Fymera configurator only. */
#asg-configuratore-wrapper .asg-ux-journey {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
    margin: 0 0 18px;
    padding: 10px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.58);
    backdrop-filter: blur(16px);
}

#asg-configuratore-wrapper .asg-ux-journey-step {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 42px;
    padding: 8px 10px;
    border-radius: 16px;
    color: rgba(226, 232, 240, 0.68);
    font-size: 12px;
    font-weight: 750;
    letter-spacing: 0.01em;
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.035);
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, color 160ms ease;
}

#asg-configuratore-wrapper .asg-ux-journey-step strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    border-radius: 999px;
    font-size: 11px;
    color: rgba(248, 250, 252, 0.82);
    background: rgba(148, 163, 184, 0.14);
}

#asg-configuratore-wrapper .asg-ux-journey-step.is-active {
    color: #ffffff;
    border-color: rgba(99, 102, 241, 0.5);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.24), rgba(124, 58, 237, 0.18));
    transform: translateY(-1px);
}

#asg-configuratore-wrapper .asg-ux-journey-step.is-active strong,
#asg-configuratore-wrapper .asg-ux-journey-step.is-complete strong {
    background: rgba(59, 130, 246, 0.9);
    color: #ffffff;
}

#asg-configuratore-wrapper .asg-ux-journey-step.is-complete {
    color: rgba(226, 232, 240, 0.9);
    background: rgba(34, 197, 94, 0.08);
    border-color: rgba(34, 197, 94, 0.18);
}

#asg-configuratore-wrapper .asg-section-microcopy {
    margin: -4px 0 18px;
    max-width: 680px;
    color: rgba(203, 213, 225, 0.78);
    font-size: 13px;
    line-height: 1.55;
}

#asg-configuratore-wrapper .asg-primary-quote-cta,
#asg-configuratore-wrapper .asg-secondary-contact-cta {
    min-height: 46px;
}

#asg-configuratore-wrapper .asg-primary-quote-cta.is-disabled,
#asg-configuratore-wrapper .asg-primary-quote-cta:disabled {
    cursor: not-allowed;
    opacity: 0.58;
    filter: grayscale(0.25);
}

#asg-configuratore-wrapper .asg-lead-modal-status {
    margin: 12px 0 0;
    padding: 12px 14px;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 750;
    line-height: 1.45;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(15, 23, 42, 0.08);
    color: #334155;
}

#asg-configuratore-wrapper .asg-lead-modal-status.is-info {
    color: #1d4ed8;
    border-color: rgba(59, 130, 246, 0.22);
    background: rgba(59, 130, 246, 0.09);
}

#asg-configuratore-wrapper .asg-lead-modal-status.is-warning {
    color: #92400e;
    border-color: rgba(245, 158, 11, 0.28);
    background: rgba(245, 158, 11, 0.1);
}

#asg-configuratore-wrapper .asg-lead-modal-status.is-error {
    color: #991b1b;
    border-color: rgba(239, 68, 68, 0.24);
    background: rgba(239, 68, 68, 0.1);
}

#asg-configuratore-wrapper .asg-lead-modal-status.is-success {
    color: #166534;
    border-color: rgba(34, 197, 94, 0.26);
    background: rgba(34, 197, 94, 0.1);
}

@media (max-width: 920px) {
    #asg-configuratore-wrapper .asg-ux-journey {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    #asg-configuratore-wrapper .asg-ux-journey {
        display: flex;
        overflow-x: auto;
        gap: 8px;
        padding-bottom: 12px;
        scroll-snap-type: x mandatory;
    }

    #asg-configuratore-wrapper .asg-ux-journey-step {
        flex: 0 0 auto;
        min-width: 126px;
        scroll-snap-align: start;
    }

    #asg-configuratore-wrapper .asg-section-microcopy {
        font-size: 12px;
    }
}

/* Fase 17 - Sticky quote bar + model selection refinement. Scoped to Fymera configurator only. */
#asg-configuratore-wrapper.asg-state-configurator .asg-ux-journey {
    position: sticky;
    top: 0;
    z-index: 44;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.22);
}

#asg-configuratore-wrapper.asg-state-configurator .asg-viewer-stack {
    align-self: flex-start;
}

#asg-configuratore-wrapper.asg-state-configurator .asg-viewer-bottom-dock {
    position: sticky !important;
    bottom: 18px !important;
    z-index: 55 !important;
    margin-top: 18px;
    transform: translateZ(0);
}

#asg-configuratore-wrapper.asg-state-configurator .asg-viewer-bottom-dock .asg-inline-price-panel.asg-inline-price-panel-docked {
    border-color: rgba(115, 148, 255, 0.26) !important;
    background: linear-gradient(180deg, rgba(5, 11, 26, 0.96), rgba(3, 8, 19, 0.98)) !important;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.46), 0 0 0 1px rgba(255, 255, 255, 0.035) inset !important;
    backdrop-filter: blur(18px) saturate(140%);
}

#asg-configuratore-wrapper .asg-model-choice-guide {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 0 24px 18px;
    padding: 14px;
    border-radius: 24px;
    border: 1px solid rgba(120, 150, 210, 0.14);
    background: linear-gradient(135deg, rgba(11, 20, 42, 0.88), rgba(4, 10, 24, 0.92));
}

#asg-configuratore-wrapper .asg-choice-guide-item {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    grid-template-areas: "num title" "num copy";
    gap: 2px 10px;
    min-width: 0;
    padding: 12px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.065);
    background: rgba(255, 255, 255, 0.035);
}

#asg-configuratore-wrapper .asg-choice-guide-item span {
    grid-area: num;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    color: #fff;
    font-size: 11px;
    font-weight: 900;
    background: linear-gradient(135deg, rgba(0, 212, 170, 0.95), rgba(70, 120, 255, 0.82));
}

#asg-configuratore-wrapper .asg-choice-guide-item strong {
    grid-area: title;
    color: #f8fbff;
    font-size: 13px;
    font-weight: 850;
    line-height: 1.2;
}

#asg-configuratore-wrapper .asg-choice-guide-item small {
    grid-area: copy;
    color: #91a7c5;
    font-size: 12px;
    line-height: 1.35;
}

#asg-configuratore-wrapper.asg-state-models .asg-controls-col {
    background: radial-gradient(circle at 20% 0%, rgba(0, 212, 170, 0.08), transparent 34%), rgba(3, 8, 20, 0.72);
}

#asg-configuratore-wrapper.asg-state-models .asg-models-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
    gap: 16px !important;
}

#asg-configuratore-wrapper.asg-state-models .asg-model-card.asg-model-card-clean {
    position: relative;
    overflow: hidden;
    min-height: 286px;
    padding: 16px;
    border-radius: 28px;
    border: 1px solid rgba(133, 164, 230, 0.16);
    background: linear-gradient(180deg, rgba(12, 22, 45, 0.88), rgba(4, 10, 24, 0.96));
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.22);
}

#asg-configuratore-wrapper.asg-state-models .asg-model-card.asg-model-card-clean::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(circle at 22% 0%, rgba(0, 212, 170, 0.14), transparent 32%), linear-gradient(135deg, rgba(255,255,255,0.06), transparent 42%);
    opacity: 0;
    transition: opacity 180ms ease;
}

#asg-configuratore-wrapper.asg-state-models .asg-model-card.asg-model-card-clean:hover::before,
#asg-configuratore-wrapper.asg-state-models .asg-model-card.asg-model-card-clean:focus-visible::before {
    opacity: 1;
}

#asg-configuratore-wrapper.asg-state-models .asg-model-card.asg-model-card-clean:hover,
#asg-configuratore-wrapper.asg-state-models .asg-model-card.asg-model-card-clean:focus-visible {
    border-color: rgba(0, 212, 170, 0.42) !important;
    transform: translateY(-4px);
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(0, 212, 170, 0.16) inset;
}

#asg-configuratore-wrapper.asg-state-models .asg-model-card .mc-visual {
    min-height: 142px;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    background-color: rgba(255, 255, 255, 0.04);
    background-size: cover;
    background-position: center;
}

#asg-configuratore-wrapper.asg-state-models .asg-model-card .mc-topline,
#asg-configuratore-wrapper.asg-state-models .asg-model-card .mc-main,
#asg-configuratore-wrapper.asg-state-models .asg-model-card .mc-actions {
    position: relative;
    z-index: 1;
}

#asg-configuratore-wrapper.asg-state-models .asg-model-card .mc-pill {
    color: #7df6df;
    border-color: rgba(0, 212, 170, 0.24);
    background: rgba(0, 212, 170, 0.09);
}

#asg-configuratore-wrapper.asg-state-models .asg-model-card .mc-index {
    color: #dbe8ff;
    background: rgba(89, 130, 255, 0.16);
    border-color: rgba(89, 130, 255, 0.24);
}

#asg-configuratore-wrapper.asg-state-models .asg-model-card .mc-info h4 {
    font-size: clamp(20px, 2vw, 27px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

#asg-configuratore-wrapper.asg-state-models .asg-model-card .mc-info p,
#asg-configuratore-wrapper.asg-state-models .asg-model-card .mc-features span {
    color: #a6b8d4;
}

#asg-configuratore-wrapper.asg-state-models .asg-model-card .mc-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
}

#asg-configuratore-wrapper.asg-state-models .asg-model-card .mc-cta {
    min-height: 42px;
    padding: 0 14px;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.92), rgba(79, 70, 229, 0.92));
    box-shadow: 0 12px 28px rgba(59, 130, 246, 0.24);
}

@media (max-width: 980px) {
    #asg-configuratore-wrapper.asg-state-configurator .asg-viewer-bottom-dock {
        bottom: 10px !important;
    }

    #asg-configuratore-wrapper .asg-model-choice-guide {
        grid-template-columns: 1fr;
        margin-inline: 18px;
    }
}

@media (max-width: 640px) {
    #asg-configuratore-wrapper.asg-state-configurator .asg-viewer-bottom-dock {
        position: sticky !important;
        bottom: 8px !important;
    }

    #asg-configuratore-wrapper.asg-state-models .asg-models-grid {
        grid-template-columns: 1fr !important;
    }

    #asg-configuratore-wrapper.asg-state-models .asg-model-card.asg-model-card-clean {
        min-height: auto;
        border-radius: 24px;
    }
}
