.as-wizard [hidden] { display: none !important; }
.as-wizard__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.as-wizard__form label { display: block; }
.as-wizard__form input:not([type="radio"]):not([type="checkbox"]), .as-wizard__form select, .as-wizard__form textarea { width: 100%; }
.as-wizard__required-note { margin: 0; }
.as-wizard .as-wizard__notes .so-floating-field { max-width: none; }
.as-wizard__summary p { white-space: pre-line; }
.as-wizard__continue { flex-shrink: 0; width: 100%; }
.as-wizard__trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 600px) { .as-wizard__grid { grid-template-columns: 1fr; } }

.ico-marker {-webkit-mask: url(icons/ico_marker.svg) no-repeat 50% 50%;mask: url(icons/ico_marker.svg) no-repeat 50% 50%;}

.as-wizard {
    padding-top: 16px;
    nav.as-wizard__steps {
        display: flex;
        margin: auto;
        width: 100%;
        max-width: 800px;
        border-radius: 8px;
        margin-bottom:56px;
        .as-wizard__step {
            padding: 12px;
            border: 1px solid var(--Neutral-Dark);
            margin-left: -1px;
            flex:1;
            position: relative;
            transition: background 0.4s ease;
            &:after {
                content: '';
                position: absolute;
                top: 50%;
                transform: translateY(-50%);
                right: -6px;
                width: 6px;
                height: 14px;
            }

            &:first-child {
                margin-left: 0;
                border-top-left-radius: 8px;
                border-bottom-left-radius: 8px;
            }
            &:last-child {
                border-top-right-radius: 8px;
                border-bottom-right-radius: 8px;
            }

            &:nth-child(1) { z-index: 4; }
            &:nth-child(2) { z-index: 3; }
            &:nth-child(3) { z-index: 2; }
            &:nth-child(4) { z-index: 1; }

            &:nth-child(1) .icon {-webkit-mask: url(icons/ico_marker.svg) no-repeat 50% 50%;mask: url(icons/ico_marker.svg) no-repeat 50% 50%;}
            &:nth-child(2) .icon {-webkit-mask: url(icons/ico_meccanica.svg) no-repeat 50% 50%;mask: url(icons/ico_meccanica.svg) no-repeat 50% 50%;}
            &:nth-child(3) .icon {-webkit-mask: url(icons/ico_envelope.svg) no-repeat 50% 50%;mask: url(icons/ico_envelope.svg) no-repeat 50% 50%;}
            &:nth-child(4) .icon {-webkit-mask: url(icons/ico_phone.svg) no-repeat 50% 50%;mask: url(icons/ico_phone.svg) no-repeat 50% 50%;}

            .as-wizard__step-content {
                display: flex;
                gap: 8px;
                .as-wizard__step-icon {
                    display: flex;
                    width: 32px;
                    aspect-ratio: 1 / 1;
                    justify-content: center;
                    align-items: center;
                    border-radius: 50%;
                    border: 1px solid;
                    .icon {
                        width: 24px;
                        height: 24px;
                        background: var(--Grigio-300);
                    }
                }
                .as-wizard__step-text {
                    display: flex;
                    flex-direction: column;
                    color: var(--Grigio-400);
                    font-size: 14px;
                    font-style: normal;
                    font-weight: 500;
                    line-height: 16px;
                }
            }

            &.is-reached,
            &[aria-disabled="false"] {
                background: white;
                border-color: var(--Arancione-500);
                .as-wizard__step-icon {
                    border-color: var(--Arancione-500);
                    .icon {
                        background: var(--Arancione-500);
                        transition: background 0.4s ease;
                    }
                }
                .as-wizard__step-text {
                    .as-wizard__step-number {
                        color: var(--Arancione-500);
                    }
                    .as-wizard__step-label {
                        color: var(--Grigio-500);
                    }
                }
                &[aria-disabled="false"]:hover {
                    background: var(--Arancione-50);
                    .as-wizard__step-icon {
                        border-color: var(--Arancione-500);
                        background: var(--Arancione-500);
                        .icon {
                            background: white;
                        }
                    }
                    s.as-wizard__step-text {
                        font-weight: 600;
                        .as-wizard__step-number {
                            color: var(--Arancione-500);
                        }
                        .as-wizard__step-label {
                            color: var(--Grigio-500);
                        }
                    }
                }
            }
            &[aria-current="step"] {
                background: var(--Arancione-50);
                pointer-events: none;
                .as-wizard__step-icon {
                    border-color: var(--Arancione-500);
                    background: var(--Arancione-500);
                    .icon {
                        background: white;
                    }
                }
                .as-wizard__step-text {
                    font-weight: 600;
                    .as-wizard__step-number {
                        color: var(--Arancione-500);
                    }
                    .as-wizard__step-label {
                        color: var(--Grigio-500);
                    }
                }
            }

            &:not(:last-child) {
                &.is-reached,
                &[aria-disabled="false"] {
                    &:after {
                        background: url(icons/ico_arrow_off.svg) center / contain no-repeat;
                    }
                }
                &[aria-current="step"] {
                    &:after {
                        background: url(icons/ico_arrow_on.svg) center / contain no-repeat;
                    }
                }
            }

            &[aria-disabled="true"] {
                pointer-events: none;
                &:not(.is-reached) .as-wizard__step-icon {
                    border-color: transparent;
                }
            }
            &[aria-disabled="false"] {
                cursor: pointer;
            }
        }
    }
    > div:not([data-wizard-panel="0"]) {
        margin: auto;
        width: 100%;
        max-width: 800px;
        padding-bottom: 80px;
        .as-wizard__services {
            width: 100%;
            max-width: 594px;
            margin: auto;
            display: flex;
            flex-direction: column;
            gap: 8px;
            margin-top: 16px;
        }
    }
    .pre_title {
        margin:auto;
        width: fit-content;
        &.bold {
            padding: 8px 13px 8px 8px;
            align-items: center;
            gap: 4px;
            border-radius: 4px;
            background: var(--Arancione-50);
            text-transform: none;
            font-size: 16px;
            font-style: normal;
            font-weight: 600;
            line-height: 19px;
            letter-spacing: normal;
        }
    }
    .so-floating-field {
        max-width: 594px;
        margin: auto;
    }

    .as-wizard__services {
        display: flex;
        flex-wrap: wrap;
        .as-wizard__service {
            display: flex;
            padding: 16px;
            gap: 16px;
            align-items: center;
            color: var(--Grigio-500);
            font-size: 24px;
            font-weight: 700;
            line-height: 29px;
            border-radius: 4px;
            background: var(--Bianco);
            border: 1px solid var(--Bianco);
            transition: background 0.4s ease;
            cursor: pointer;
            &:hover,
            &[aria-pressed="true"] {
                border-radius: 4px;
                border: 1px solid var(--Arancione-500);
                background: var(--Arancione-50);
            }
            .as-wizard__icon-wrapper {
                display: flex;
                width: 40px;
                height: 40px;
                padding: 8px;
                justify-content: center;
                align-items: center;
                flex-shrink: 0;
                aspect-ratio: 1 / 1;
                border-radius: 624.375px;
                border: 1.111px solid var(--Arancione-500);
                .as-wizard__icon {
                    display: inline-block;
                    width: 24px;
                    height: 24px;
                    flex-shrink: 0;
                    background-color: var(--Arancione-500);
                    -webkit-mask-size: contain !important;
                    mask-size: contain !important;
                }
            }
        }
    }

    form.as-wizard__form {
        display:flex;
        flex-direction: column;
        gap: 32px;
        .as-wizard__group {
            display: flex;
            gap: 16px;
            color: var(--Grigio-500);
            font-size: 16px;
            font-style: normal;
            font-weight: 500;
            line-height: 20px;
            align-items: center;
            > div {
                flex: 1;
                display: flex;
                gap: 16px;
                align-items: center;
            }
            > .as-wizard__vehicle-options {
                flex-wrap: wrap;
            }
            &.final {
                flex-direction: column;
                gap: 32px!important;
                align-items: flex-start!important;
                > label {
                    display: flex;
                    gap: 8px;
                    color: var(--Grigio-400);
                    font-size: 14px;
                    font-style: normal;
                    font-weight: 400;
                    line-height: 20px;
                }
            }
        }
        .as-wizard__vehicle-fields {
            display: flex;
            gap: 16px;
             > div {
                flex: 1;
            }
            .so-floating-field {
                max-width: 100%;
            }
        }
    }

    .send-title:before {
        content: '';
        margin-right: 12px;
        width: 32px;
        height: 32px;
        display: inline-block;
        vertical-align: middle;
        -webkit-mask: url(icons/ico_checked.svg) no-repeat 50% 50%;
        mask: url(icons/ico_checked.svg) no-repeat 50% 50%;
        background-color: var(--Arancione-500);
    }
    .as-wizard__summary {
        display: flex;
        flex-direction: column;
        background-color: var(--Bianco);
        .as-wizard__summary-intestazione {
            color: var(--Grigio-500);
            text-align: center;
            font-style: normal;
            font-weight: 700;
            line-height: 20px;
            border-top: 1px solid;
            border-left: 1px solid;
            border-right: 1px solid;
            border-color: var(--Arancione-500);
            width: 100%;
            padding: 12px;
        }
        .as-wizard__summary-body {
            display: flex;
            border: 1px solid var(--Arancione-500);
            padding: 24px;
            > section {
                flex: 1;
                &:not(:first-child) {
                    padding-left: 40px;
                    border-left: 1px solid var(--Neutral-Dark);
                }
                .as-wizard__summary-title {
                    color: var(--Grigio-500);
                    font-size: 16px;
                    font-style: normal;
                    font-weight: 600;
                    line-height: 19px;
                }
                .as-wizard__summary-text {
                    color: var(--Grigio-400);
                    font-size: 14px;
                    font-style: normal;
                    font-weight: 400;
                    line-height: 20px;
                }
            }
        }
    }
}

@media (max-width: 1024px) {
    .as-wizard {
        padding-left: 30px;
        padding-right: 30px;
        padding-bottom:30px;
        nav.as-wizard__steps {
            flex-direction: column;
            margin-bottom: 32px;
            .as-wizard__step {
                margin-left: unset;
                margin-top: -1px;
                &:after {
                    top: unset;
                    transform: translateX(-50%) rotate(90deg);
                    bottom: -10px;
                    right: 50%;
                }
                &:first-child {
                    border-bottom-left-radius: 0px;
                    border-top-right-radius: 8px;
                }
                &:last-child {
                    border-top-right-radius: 0px;
                    border-bottom-left-radius: 8px;
                }
            }
        }
    }
}