/**
 * All of the CSS for your public-facing functionality should be
 * included in this file.
 */

[x-cloak] {
    display: none !important;
}

.fade-enter {
    transition: opacity 0.5s ease-in-out;
}

.fade-enter-start {
    opacity: 0;
}

.fade-enter-end {
    opacity: 1;
}

.multistep-form {
    display: grid;

    & .multistep-form-loader {
        background-color: #cecece;
        width: 100%;
        height: 100%;
        grid-area: 1/1;
        min-height: 300px;
        z-index: 2;
        display: grid;
        place-items: center;

        & .loading-indicator {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;

            p {
                margin-bottom: 0.5rem;
                text-align: center;
                padding-left: 0.5rem;
                font-size: 1.5rem;
                font-weight: 600;
                color: var(--e-global-color-primary);
            }

            .icon {
                font-size: 3rem;
                color: var(--e-global-color-primary);
            }
        }
    }

    & .multistep-form-inner {
        display: flex;
        flex-direction: column;
        row-gap: 15px;

        & .step-title {
            font-size: 25px;
            line-height: 30px;
            color: var(--e-global-color-primary);
            font-weight: 600;
        }

        & .step {
            --check-size: 22px;
            display: flex;
            flex-direction: column;
            row-gap: 22px;
            width: 100%;
            max-width: 794px;

            &.final-step{
                max-width: 100%;
                & .step-title{
                    margin-bottom: 56px;
                }
            }

            & .form-group{
                display: grid;
                row-gap: 22px;
            }

            & .form-radio,
            & .form-check{
                display: grid;
                grid-template-columns: var(--check-size) 1fr;
                align-items: center;
                gap: 26px;

                &:has(input:hover, input:focus, label:hover, label:focus){
                    & input{
                        border-color: var(--e-global-color-primary);
                    }
                }

                & input[type="checkbox"],
                & input[type="radio"]{
                    width: var(--check-size);
                    height: var(--check-size);
                    background-color: #fff;
                    border: 2px solid #000;
                    cursor: pointer;
                    padding: 0;
                }
                & input[type="checkbox"]{
                    appearance: none;

                    &:checked{
                        background-color: #fff;
                        background-image: url('../icons/check.svg');
                        background-repeat: no-repeat;
                        background-size: 75%;
                        background-position: center center;
                    }
                }
                & input[type="radio"]{
                    appearance: none;
                    border-radius: 50%;
                    border-color: #000;
                    &:checked{
                        background-color: #fff;
                        background-image: url('../icons/radio.svg');
                        background-repeat: no-repeat;
                        background-size: 12px;
                        background-position: 3px 3px;
                    }
                }
                & label{
                    cursor: pointer;
                    line-height: var(--check-size);
                }
                & textarea{
                    width: 100%;
                    grid-column: span 2;
                    border-color: #000;
                    &:focus{
                        border-color: var(--e-global-color-primary);
                    }
                }
            }
        }

        & .step-notice{
            margin-top: 30px;
            & h4{
                font-size: 20px;
                line-height: 30px;
                margin-bottom: 1rem;
                font-weight: 600;
            }
            & p{
                line-height: 30px;
                margin-bottom: 0;
            }
        }

        & .steps-container {
            display: flex;
            flex-direction: column;
            width: 100%;
        }
    }

    &:has(.progress-step.active:last-child){
        .multistep-form-actions{
            justify-content: flex-start;
        }
    }

    & .multistep-form-actions {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 1rem;
        flex-wrap: wrap;
        margin-top: 30px;
        @media screen and (max-width: 575.98px) {
            justify-content: center;
        }

        & .button {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            flex-wrap: nowrap;
            justify-content: center;

            @media screen and (min-width: 992px) {
                min-width: min(196px, 100%);
            }
            &.button-prev {
                &:hover,
                &:focus,
                &:focus-within {
                    & .icon {
                        transform: translateX(-10px);
                        transition: transform 0.3s ease-out;
                    }
                }

                & .icon {
                    transform: translateX(0);
                    transition: transform 0.3s ease-out;
                }
            }
            &.button-next,
            &.button-submit{
                &:disabled,
                &.disabled{
                    padding: 12px 26px 12px 26px;
                }
            }
        }
    }

    & .progress-bar {
        --step-circle-size: 100px;
        --active-indicator-size: 30px;
        --step-circle-font-size: 2.375rem;
        display: grid;
        width: 100%;
        align-items: center;
        margin-bottom: 60px;

        @media screen and (max-width: 991.98px) {
            --step-circle-size: 50px;
            --active-indicator-size: 20px;
            --step-circle-font-size: 1.75rem;
        }

        @media screen and (max-width: 575.98px) {
            --step-circle-size: 46px;
            --active-indicator-size: 14px;
            --step-circle-font-size: 1.25rem;
        }

        @media screen and (max-width: 429.98px) {
            --step-circle-size: 30px;
            --active-indicator-size: 14px;
            --step-circle-font-size: 1.125rem;
        }

        & .progress-line {
            grid-area: 1/1;
            z-index: 0;
            height: 1px;
            width: 100%;
            background-color: var(--e-global-color-primary);
        }

        & .progress-steps {
            grid-area: 1/1;
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(var(--step-circle-size), 1fr));
            z-index: 1;
            place-items: center;

            &.forward {
                & .progress-step.active {
                    &:before {
                        animation: slideRight 0.5s ease-in-out forwards;
                    }
                }
            }

            &.backward {
                & .progress-step.active {
                    &:before {
                        animation: slideLeft 0.5s ease-in-out forwards;
                    }
                }
            }

            & .progress-step {
                width: var(--step-circle-size);
                height: var(--step-circle-size);
                display: flex;
                align-items: center;
                justify-content: center;
                color: var(--e-global-color-primary);
                background-color: #fff;
                border: 2px solid var(--e-global-color-primary);
                border-radius: 50%;
                font-size: var(--step-circle-font-size);
                line-height: 1;
                font-weight: 600;
                outline: 10px solid #fff;

                &.active,
                &.completed {
                    color: #fff;
                    background-color: var(--e-global-color-primary);
                    position: relative;
                    outline: none;
                    transition: color 0.5s ease-in-out, background-color 0.5s ease-in-out, border-color 0.5s ease-in-out;
                }

                &.active {
                    &:before {
                        position: absolute;
                        right: 92.5%;
                        width: var(--active-indicator-size);
                        height: var(--active-indicator-size);
                        content: "";
                        background-color: var(--e-global-color-secondary);
                        border-radius: 50%;
                        z-index: -1;
                    }
                }
            }
        }
    }

    & .finder-result {
        --icon-size: 50px;
        display: grid;
        grid-template-columns: 4fr 6fr;
        gap: 2rem 3.125rem;
        @media screen and (max-width: 1023.98px) {
            grid-template-columns: 1fr;
        }

        & .finder-result-column {
            display: flex;
            flex-direction: column;
            row-gap: 22px;
            padding: 39px 0;
            &.pro-package {
                padding: 38px 45px;
                border: 1px solid var(--e-global-color-primary);

                @media screen and (max-width: 767.98px) {
                    padding: 28px 25px;
                }

                & .finder-result-icon{
                    background-color: var(--e-global-color-primary);
                }
            }

            & .course-package{
                & p{
                    font-size: 16px;
                    margin-bottom: 8px;
                }
                
                & .package-modal{
                    position: fixed;
                    top: 50% !important;
                    left: 50% !important;
                    transform: translate(-50%, -50%) !important;
                    z-index: 999;
                    background: #fff;
                    padding: 50px 50px 70px;
                    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
                    display: flex;
                    flex-direction: column;
                    row-gap: 30px;
                    width: min(794px, 90%);
                    @media screen and (max-width: 767.98px){
                        padding: 50px 30px 70px;
                    }
                    & .modal-header{
                        display: flex;
                        width: 100%;
                        justify-content: flex-end;
                    }
                    & .modal-body{
                        display: flex;
                        flex-direction: column;
                        row-gap: 22px;
                        font-size: 16px;
                    }

                    & .modal-title{
                        color: var(--e-global-color-primary);
                        font-size: 25px;
                        line-height: 30px;
                        font-weight: 600;
                    }

                    & .modal-close{
                        cursor:pointer;
                        transform: translateX(20px);
                        & svg{
                            pointer-events: none;
                        }
                    }
                }
            }

            & .package-title{
                font-size: 20px;
                font-weight: 600;
                line-height: 30px;
                margin-bottom: 22px;
                display: flex;
                align-items: center;
                flex-wrap: nowrap;
                column-gap: 8px;

                & .icon{
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    line-height: 1;
                    cursor: pointer;
                    width: 28px;
                    height: 28px;

                    & svg{
                      pointer-events: none;
                    }
                }
            }

            & .list-check{
                --check-size: 20px;
                list-style: none;
                margin-left: 0;
                & li{
                    padding-left: calc(var(--check-size) + 24px);
                    line-height: 30px;
                    font-weight: 600;
                    background-image: url("../icons/check.svg");
                    background-size: var(--check-size);
                    background-position: left center;
                    background-repeat: no-repeat;
                }
            }
        }

        & .finder-result-title {
            display: grid;
            grid-template-columns: var(--icon-size) auto;
            align-items: center;
            column-gap: 20px;
            border-bottom: 1px solid var(--e-global-color-primary);
        }

        & .finder-result-icon {
            width: var(--icon-size);
            height: var(--icon-size);
            background-color: var(--e-global-color-secondary);
            display: grid;
            place-items: center;
        }

        & .finder-result-heading {
            font-size: 22px;
            font-weight: 500;
            line-height: 24px;
            margin-bottom: 0;
        }

        & .finder-result-content {
            font-size: 1rem;
            line-height: 1.5;
        }

        & .button-cta{
            --icon-size: 60px;
            --border-size: 2px;
            display: flex;
            align-items: center;
            height: var(--icon-size);
            border-radius: 42px;
            column-gap: 40px;
            padding-left: 22px;
            width: max-content;
            border: 2px solid var(--e-global-color-primary);
            color: var(--e-global-color-primary);
            background-color: #fff;
            position: relative;
            z-index: 1;
            font-size: 16px;
            font-weight: 500;
            &:before{
                content: '';
                position: absolute;
                left: calc(-1 * var(--border-size));
                top: calc(-1 * var(--border-size));
                border-radius: 42px;
                width: var(--icon-size);
                height: var(--icon-size);
                background-color: var(--e-global-color-primary);
                z-index: -1;
                transition: width 0.3s ease-out;
            }
            &:hover,
            &:focus,
            &:focus-within {
                color: #fff;
                background-color: transparent;
                border-color: var(--e-global-color-primary);
                &:before{
                    width: calc(100% + (var(--border-size) * 2));
                    transition: width 0.3s ease-out;
                }
            }
            & .icon {
                color: #fff;
                z-index: 1;
            }
        }
    }
    & .cf7-form-wrapper{
        display: none !important;
    }
}

@keyframes slideRight {
    from {
        transform: translateX(-500%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes slideLeft {
    from {
        transform: translateX(750%);
    }
    to {
        transform: translateX(0);
    }
}