
* {
    outline: none !important;
}

:root {
    --widget-btn-bg-on: #E7E8EC;
    --widget-btn-bg-off: #75AED7;
    --callback-bg: #F5F6FA;
    --callback-btn-bg: #E7E8EC;
    --callback-active-btn-bg: #196CA7;
    --footer-bg: #196CA7;
    --text-color: #9197A5;
    --white: #FFFFFF;
    --border-radius: 20px;
    --button-radius: 8px;
    --shadow: 0px 8px 25px rgba(0, 0, 0, 0.1);
}

/*//////////////PHONE INPUT////////////////*/

.iti {
    width: 100%;
    max-width: 400px;
}

.iti__selected-flag {
    background-color: #f8f9fc;
    border-right: 2px solid #9197A5;
    height: 26px;
    padding: 6px 6px 6px 14px;
    border-radius: 8px 0 0 8px;
}

.iti__flag {
    border-radius: 4px;
}

.iti__flag-container {
    display: flex;
    align-items: center;
}


.phone-input {
    width: 100%;
    max-width: 400px;
    height: 44px;
    padding-left: 68px !important;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    background-color: #f8f9fc;
    overflow: hidden;
}

.error .phone-input {
    box-shadow: 0 0 0 1px red;
}

/*//////////////STYLE THEME///////////////////*/
.glass-light,
.glass-dark {
    .callback-title {
        color: #FFFFFF;
        text-align: center;
    }
    .callback-title2 {
        text-align: center;
        color: #E7E8EC !important;
        .subtitle2 {
            color: #E7E8EC !important;
        }
    }
    .callback-info {
        color: #E7E8EC !important;
    }
    .callback-close {
        background: transparent;
        backdrop-filter: blur(20px);
    }
    .timePicker {
        border-radius: 8px;
    }
    .phone-input {
        color: white;
        background: #FFFFFF26;
        backdrop-filter: blur(30px);
    }
    .iti__selected-flag {
        background: transparent;
        border-right: 2px solid #ffffff;
    }
    .iti__flag {
        border: 1px solid #FFFFFF;
    }
    .logo {
        .logo-info {
            color: white !important;
        }
        svg {
            path {
                fill: white !important;
            }
        }
    }
}

.glass-light {
    border: 1px solid !important;
    background: #0F101A33;
    backdrop-filter: blur(6px);
}

.glass-light:before {
    content: "";
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 23px;
    padding: 2px;
    background: linear-gradient(123.64deg, rgba(245, 246, 250, 0.6) 0%, rgba(145, 146, 148, 0) 97.25%);
    -webkit-mask: linear-gradient(white 0 0) content-box, linear-gradient(white 0 0);
    mask: linear-gradient(white 0 0) content-box, linear-gradient(white 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.glass-dark {
    position: relative;
    display: block;
    background: rgba(15, 16, 26, 0.2);
    border-radius: var(--border-radius);
    backdrop-filter: blur(6px);
    padding: 20px;
}

.glass-dark::before {
    content: "";
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: 23px;
    padding: 2px;
    background: linear-gradient(
            123.93deg,
            rgba(255, 255, 255, 0.3) 3.41%,
            rgba(153, 153, 153, 0) 52.79%, rgba(255, 255, 255, 0.3) 97.46%);
    -webkit-mask: linear-gradient(white 0 0) content-box, linear-gradient(white 0 0);
    mask: linear-gradient(white 0 0) content-box, linear-gradient(white 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

/*//////////////GENERAL STYLES////////////////*/

.hidden {
    display: none !important;
}

.show-modal {
    opacity: 1;
    transition: opacity 0.3s ease-out, transform 0.3s ease-out;
    transform: translateY(0px);

}

.hidden-modal {
    /*transition: opacity 0.3s ease-out, transform 0.3s ease-out;*/
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none !important;
}


.show-callback-modal {
    transition: opacity 0.3s ease-out, transform 0.3s ease-out !important;
    opacity: 1;
    transform: translate(-50%, -50%);
    pointer-events: all;
}

.hidden-callback-modal {
    pointer-events: none !important;
    /*transition: opacity 0.3s ease-out, transform 0.3s ease-out !important;*/
    opacity: 0;
    transform: translate(-50%, calc(-50% + 50px));
}

.hidden-footer {
    transition: opacity 0.3s ease-out, transform 0.3s ease-out !important;
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

.show-footer {
    transition: opacity 0.3s ease-out, transform 0.3s ease-out !important;
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}


.show-minor-buttons {
    .widget-button {
        opacity: 1;
        transition: opacity 0.3s ease-out, transform 0.3s ease-out;
        transform: translateX(0px);
        pointer-events: all;
    }


    .widget-button:nth-child(1) {
        transition-delay: 0s;
    }

    .widget-button:nth-child(2) {
        transition-delay: 0.1s;
    }

    .widget-button:nth-child(3) {
        transition-delay: 0.2s;
    }

    .widget-button:nth-child(4) {
        transition-delay: 0.3s;
    }

    .widget-button:nth-child(5) {
        transition-delay: 0.4s;
    }

    .widget-button:nth-child(6) {
        transition-delay: 0.5s;
    }

    .widget-button:nth-child(7) {
        transition-delay: 0.6s;
    }

    .widget-button:nth-child(8) {
        transition-delay: 0.7s;
    }

    .widget-button:nth-child(9) {
        transition-delay: 0.8s;
    }
}

.hidden-minor-buttons {
    .widget-button {
        transition: opacity 0.3s ease-out, transform 0.3s ease-out;
        opacity: 0;
        transform: translateX(var(--custom-value));
        pointer-events: none;
    }

}


/*////////////// WIDGET BUTTON //////////////*/

#streamCRM-widget-button {
    pointer-events: all;
    display: flex;
    position: fixed;
    gap: 12px;
}

.widget-button {
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    width: 64px;
    height: 64px;
    border-radius: 40px;
    background-color: var(--widget-btn-bg-on);
}

.widget-opens {
    background: var(--widget-btn-bg-on);
}

.widget-closed {
    background: var(--widget-btn-bg-off);
}


.all-buttons:has(div .show-minor-buttons) {
    backdrop-filter: blur(20px);
    box-shadow: 0px 4px 25px 0px #A3A3A34D;
}

.all-buttons {
    display: flex;
    position: fixed;
    align-items: center;
    border-radius: 100px;
    gap: 12px;
    /*transition: 0.3s;*/

}

.all-buttons {
    padding: var(--insetPad) !important;
}

.all-buttons.top-right {
    bottom: auto;
    left: auto;
    right: 0;
    top: 0;
}

.all-buttons.bottom-right {
    bottom: 0;
    left: auto;
    right: 0;
    top: auto;
}

.all-buttons.top-left {
    bottom: auto;
    left: 0;
    right: auto;
    top: 0;
}
.all-buttons.bottom-left {
    bottom: 0;
    left: 0;
    right: auto;
    top: auto;
}

/*@media (max-width: 550px) {*/
/*    .all-buttons:has(div .show-minor-buttons) {*/
/*        backdrop-filter: blur(20px);*/
/*        box-shadow: 0px 4px 25px 0px #A3A3A34D;*/
/*    }*/

/*    .all-buttons {*/
/*        background: #FFFFFF99;*/
/*        padding: 16px;*/
/*        backdrop-filter: blur(20px);*/
/*        box-shadow: 0px 4px 25px 0px #A3A3A34D;*/
/*    }*/
/*}*/

.widget-minor-buttons {
    display: flex;
    gap: 12px;
}

.skype-icon {
    background-color: #02AFF0;
}

.telegram-icon {
    background: linear-gradient(180deg, #2AABEE 0%, #229ED9 100%);

    img {
        margin-right: 4px;
    }
}

.whatsapp-icon {
    background: linear-gradient(0deg, #1FAF38 -9900%, #60D669 100%);
}

.messenger-icon {
    background: radial-gradient(110% 110% at 16.75% 100%, #0099FF 0%, #A033FF 60%, #FF5280 90%, #FF7061 100%);
}

.email-icon {
    background: #F4F2ED;
}

.viber-icon {
    background: #7360F2;
}

.vk-icon {
    background: rgb(112 132 191);
}

/*////////////// MODAL CALLBACK //////////////*/

@media (max-width: 550px) {
    #streamCRM-callback {
        flex-direction: column;
        position: fixed;
        width: 100% !important;
        height: 100%;
        top: 0 !important;
        left: 0 !important;
        transform: none !important;
        border-radius: 0 !important;
    }

    #streamCRM-callback:has(.glass-dark),
    #streamCRM-callback:has(.glass-light) {
        top: 20px !important;
        width: 95% !important;
        height: fit-content;
    }

    #streamCRM-callback:has(.glass-dark) .callback-close,
    #streamCRM-callback:has(.glass-light) .callback-close {
        top: 1px !important;
        right: 15px !important;
    }

    .logo-theme-mobile {
        display: flex !important;
        width: 100% !important;
        justify-content: center;
        align-items: center;
        gap: 12px;
        font-size: 9px;
        .logo-info {
            color: #E7E8EC !important;
        }
    }

    .callback-image {
        display: none !important;
    }

    .callback-info {
        display: none !important;
    }
    .callback-image-mobile {
        display: flex !important;
        margin-top: 74px !important;
        flex: 1 !important;
        justify-content: center;
        align-items: center;
        height: fit-content !important;
        img {
            height: fit-content !important;
        }
    }


    .callback-content, .mini-callback-content {
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    .callback-close {
        top: 14px !important;
        right: 14px !important;
    }

    .mini-callback-content {
        flex-direction: column;
        .callback-form {
            margin-top: 74px !important;
            gap: 16px !important;
        }
    }

}

#streamCRM-callback {
    pointer-events: all;
    display: flex;
    position: fixed;
    justify-content: center;
    align-items: center;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    width: 100%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

#streamCRM-callback:not(.mini-callback-modal) {
    max-width: 636px;
}

#streamCRM-callback.mini-callback-modal {
    max-width: 401px;
}

.logo-theme-mobile {
    display: none;
}

.callback-success {
    background-color: white;
    border-radius: var(--border-radius);
    display: flex;
    flex-direction: column;
    gap: 8px;
    justify-content: center;
    align-items: center;
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 330px;
}

.callback-content, .mini-callback-content {
    border-radius: var(--border-radius);
    display: flex;
    position: relative;
    width: 100%;
    height: 100%;
}

.callback-form {
    display: flex;
    flex: 10;
    flex-direction: column;
    padding: 42px 24px 24px;
    gap: 12px;
}

.callback-image {
    overflow: hidden;
}

.callback-image img {
    object-fit: contain;
}

.callback-image:not(.callback-image--mini).callback-image--size-crop img {
    transform: scale(1.9);
}

.callback-content  {

    .callback-image {
        display: flex;
        position: relative;
        flex: 8;
        img {
            width: 239px;
        }
        .logo {
            display: flex;
            white-space: nowrap;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            gap: 8px;
            position: absolute;
            bottom: 32px;
            left: 50%;
            transform: translateX(-50%);

            path {
                fill: #9197A5;
            }

            .logo-info {
                font-size: 9px;
                color: #9197A5;
            }
        }
    }
    .theme-icons {
        display: flex;
        width: 239px;
        position: relative;

        img {
            width: 100%;
        }
    }
}


.callback-content .callback-form {
    align-items: start;
    max-width: 350px;;
    min-width: 350px;
}

.mini-callback-content {
    flex-direction: column;

    .callback-image {
        padding-top: 36px;
    }
    .theme-icons {
        display: flex;
        justify-content: center;
        align-items: center;
        position: relative;
        img {
            border-top-right-radius: var(--border-radius);
            border-top-left-radius: var(--border-radius);
        }
    }

    .callback-info {
        display: flex;
        flex-direction: column;
    }

}
.mini-callback-content .callback-form {
    align-items: center;
}

.callback-close {
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    z-index: 1;
    cursor: pointer;
    background-color: var(--callback-bg);
    color: var(--widget-btn-bg-on);
    top: 0;
    right: 0;
    margin: 8px;
    border-radius: 50%;
    width: 36px;
    height: 36px;
}
.callback-image-mobile {
    display: none;
}


.callback-buttons {
    display: flex;
    gap: 12px;
    width: 100%;
    justify-content: space-between;
}

.callback-buttons button {
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    padding: 12px 20px;
    outline: none;
    border: none;
    border-radius: var(--button-radius);
    height: 44px;
}


.callback-title {
    font-size: 24px;
    font-weight: 700;
}

.callback-title2 {
    font-size: 14px;
    font-weight: 400;
    color: #9197A5;
}

.callback-title2 span.subtitle2 {
    color: #196CA7;
}


.callback-info {
    display: flex;
    flex-direction: row;
    gap: 20px;
    font-size: 9px;
    font-weight: 400;
    color: #9197A5;
}

.call-planning {
    flex: 1;
    width: 188px;
    background-color: var(--callback-btn-bg);
}

.call-planning[disabled] {
    cursor: not-allowed;
}

.call-order {
    flex: 1;
    color: var(--white);
    background-color: var(--widget-btn-bg-on);
}

.call-order[disabled] {
    cursor: not-allowed;
}

#feedback-call-order[disabled] {
    cursor: not-allowed;
}

.input-wrap {
    width: 100%;
}

.field-error {
    color: #D32F2F;
    font-size: 11px;
    margin-top: 2px;
    line-height: 1.3;
}

/*////////////// MODAL feedback //////////////*/
@media (max-width: 550px) {
    #streamCRM-feedback {
        position: fixed;
        width: calc(100% - 40px) !important;
        height: calc(100% - 40px) !important;
        border-radius: 0 !important;
    }

    .feedback-close {
        top: 14px !important;
        right: 15px !important;
    }
    .feedback-content {
        margin-top: 74px !important;
        height: 446px !important;

    }
}
#widget-container html {
    pointer-events: none;
}

#widget-container body {
    pointer-events: none;
}

#streamCRM-feedback {
    pointer-events: all;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    height: 460px;
    background-color: var(--white);
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    z-index: 10000;
}


.feedback-close {
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    cursor: pointer;
    background-color: var(--callback-bg);
    color: var(--widget-btn-bg-on);
    top: 0;
    right: 0;
    margin: 8px;
    border-radius: 50%;
    width: 36px;
    height: 36px;
}

.feedback-callback-button {
    margin: auto;
    width: 220px;
    height: 44px;
    cursor: pointer;
    border: none;
    border-radius: 8px;
}

.time-control {
    display: flex;
    position: relative;
    width: 100%;
    justify-content: space-between;
    gap: 8px;

    #setTime {
        color: #FFFFFF;
    }

    .days-dropdown {
        display: flex;
        flex: 1;
        justify-content: center;
        align-items: center;
        background: #F5F6FA;
        position: relative;
        border-radius: 8px;
        width: 190px;
        border: none !important;
        cursor: pointer;


        .calendar-icon {
            position: absolute;
            top: 13px;
            left: 12px;
            svg {
                width: 18px;
                height: 18px;
            }
        }

        .arrow-icon {
            position: absolute;
            top: 18px;
            right: 12px;
            transition: transform 0.4s ease-out;
        }

        select {
            appearance: none;
            -webkit-appearance: none;
            -moz-appearance: none;
            display: flex;
            width: 100%;
            justify-content: space-between;
            border-radius: 8px;
            background: transparent;
            padding: 13px 13px 13px 38px;
            outline: none;
            border: none;
            cursor: pointer;
        }

        select:focus ~ .arrow-icon {
            transform: rotate(180deg);
            transition: transform 0.4s ease-out;
        }
    }


    .timePicker {
        position: relative;
        flex: 1;
        background: #F5F6FA;
        border-radius: 8px;
    }

    .timeButton {
        display: flex;
        position: relative;
        justify-content: space-between;
        align-items: center;
        width: 136px;
        padding: 13px;
        background: #F5F6FA;
        border: none;
        border-radius: 8px;
        cursor: pointer;

        .timeButton-text {
            margin-left: 24px;
        }

        .clock-icon {
            position: absolute;
            top: 12px;
            left: 12px;
        }

        .arrow-icon {
            position: absolute;
            top: 18px;
            right: 12px;
        }
    }


    .time-picker {
        display: flex;
        flex-direction: column;
        width: 150px;
        top: 47px;
        gap: 12px;
        padding: 10px;
        position: absolute;
        background: white;
        border: none;
        border-radius: 5px;
        z-index: 999;
        box-shadow: 0px 8px 25px rgba(0, 0, 0, 0.1);
    }


}

.feedback-header {
    display: flex;
    align-items: center;
    gap: 16px;
}

.feedback-title {
    text-align: left;
    font-size: 16px;
    font-weight: 600;
    max-width: 290px;
}

.feedback-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    min-width: 64px;
    min-height: 64px;
    width: 64px;
    height: 64px;
    padding: 4px;
    background: #CEF9FF;
    border-radius: 100%;
}

.feedback-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    gap: 16px;
}

.feedback-success {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    gap: 8px;

}

#feedback-form {
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: space-between;
    gap: 10px;
}

.input-group {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    gap: 10px;
}

.input {
    display: flex;
    gap: 10px;
    width: calc(100% - 12px);
    border-radius: 8px;
    background: var(--callback-bg);
    padding: 6px;
}

.input img {
    padding: 4px 4px 0px 4px;
}

.input input, .input textarea {
    width: 100%;
    border: none;
    background: transparent;
    outline: none;
    font-size: 14px;
}

textarea {
    resize: none;
    height: 80px;
    padding: 3px;
}

.submit {
    width: 100%;
    padding: 10px;
    background-color: var(--widget-btn-bg-on);
    color: var(--white);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
}


/*//////////////FOOTER CALLBACK////////////////*/

#streamCRM-widget-footer {
    display: flex;
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    transition: background ease-in-out 0.25s;
    z-index: 501;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    justify-content: center;
    background-color: var(--footer-bg);
    min-height: 100px;
    /*height: 122px;*/
    width: 100%;

    .call-order {
        color: black;
    }

    #widget-footer-success {
        width: fit-content;
        display: flex;
        position: relative;
        flex-direction: column;
        align-items: center;
        gap: 16px;
        padding: 16px 0px;
        #widget-footer-success-title {
            margin-top: 26px;
            display: flex;
            color: #FFFFFF;
            flex: 1;
        }
        #widget-footer-success-close {
            cursor: pointer;
            display: flex;
            position: absolute;
            right: -85px;
            top: 15px;

        }
    }

    #widget-footer {
        width: fit-content;
        display: flex;
        position: relative;
        flex-direction: column;
        align-items: center;
        gap: 16px;
        padding: 16px 0px;

        #widget-footer-close {
            cursor: pointer;
            display: flex;
            position: absolute;
            right: 0;
            top: 15px;

        }

        #widget-footer-title {
            display: flex;
            color: #FFFFFF;
            flex: 1;
        }

        #callback-buttons {
            display: flex;
            flex: 1;
            gap: 4px;
        }

        #footer-time-control {
            display: flex;
            justify-content: right;
            gap: 4px;
        }

        #footer-form {
            display: flex;
            gap: 4px;

            #footer-call-order {
                display: flex;
                width: 188px;
            }

            #footer-call-order[disabled] {
                color: light-dark(rgba(16, 16, 16, 0.3), rgba(255, 255, 255, 0.3));
                background-color: var(--callback-btn-bg);
            }

            .time-picker {
                top: -43px;
                width: 335px;
                flex-direction: row;
                gap: 24px;
            }

            .time-control {
                display: flex;
                position: relative;
                width: 100%;

                #setTime {
                    color: #FFFFFF;
                }


                .days-dropdown {
                    display: flex;
                    flex: 1;
                    justify-content: center;
                    align-items: center;
                    background: #F5F6FA;
                    position: relative;
                    border-radius: 8px;
                    width: 190px;
                    border: none !important;
                    cursor: pointer;


                    .calendar-icon {
                        position: absolute;
                        top: 13px;
                        left: 12px;
                        svg {
                            width: 18px;
                            height: 18px;
                        }
                    }

                    .arrow-icon {
                        position: absolute;
                        top: 18px;
                        right: 12px;
                        transition: transform 0.4s ease-out;
                    }

                    select {
                        appearance: none;
                        -webkit-appearance: none;
                        -moz-appearance: none;
                        display: flex;
                        width: 100%;
                        justify-content: space-between;
                        border-radius: 8px;
                        background: transparent;
                        padding: 13px 13px 13px 38px;
                        outline: none;
                        border: none;
                        cursor: pointer;
                    }

                    select:focus ~ .arrow-icon {
                        transform: rotate(180deg);
                        transition: transform 0.4s ease-out;
                    }
                }

            }

        }
    }

}
