:root {
    --callback-orange-start: #fdc604;
    --callback-orange-end: #ee8207;
    --callback-blue-start: #1C3868;
    --callback-blue-end: #15479D;
}

.callback-widget,
.callback-widget *,
.callback-consent-modal,
.callback-consent-modal * {
    box-sizing: border-box;
}

.callback-widget {
    position: relative;
    z-index: 1000;
    font-family: "Montserrat", Arial, sans-serif;
    color: #1c3868;
}

.callback-widget__launcher {
    position: fixed;
    right: calc(10px + env(safe-area-inset-right, 0px));
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    display: flex;
    width: 64px;
    height: 64px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 3px solid transparent;
    border-radius: 50%;
    background:
        -webkit-linear-gradient(#fdc604, #ee8207) padding-box,
        -webkit-linear-gradient(90deg, #1C3868, #15479D) border-box;
    background:
        linear-gradient(#fdc604, #ee8207) padding-box,
        linear-gradient(0deg, #1C3868, #15479D) border-box;
    box-shadow: 0 8px 24px rgba(28, 56, 104, .3);
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease;
    z-index: 2;
}

.callback-widget__prompt {
    position: fixed;
    right: calc(10px + env(safe-area-inset-right, 0px));
    bottom: calc(84px + env(safe-area-inset-bottom, 0px));
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 7px 7px 13px;
    border-radius: 10px;
    background: #1c3868;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    box-shadow: 0 7px 20px rgba(28, 56, 104, .25);
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
    visibility: visible;
    z-index: 2;
}

.callback-widget__prompt-close {
    z-index: 2;
    display: flex;
    width: 23px;
    height: 23px;
    flex: 0 0 23px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .16);
    color: #fff;
    font-family: Arial, sans-serif;
    font-size: 17px;
    font-weight: 400;
    line-height: 1;
    cursor: pointer;
    transition: background .18s ease, transform .18s ease;
}

.callback-widget__prompt-open {
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    line-height: inherit;
    cursor: pointer;
    text-transform: none;
    font-weight: normal;
    height: unset;
}

.callback-widget__prompt-open:hover {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.callback-widget__prompt-close:hover {
    background: rgba(255, 255, 255, .28);
    transform: scale(1.05);
}

.callback-widget__prompt-close:focus-visible {
    outline-color: rgba(255, 255, 255, .9);
    outline-width: 2px;
    outline-offset: 2px;
}

.callback-widget__prompt::after {
    content: "";
    position: absolute;
    right: 23px;
    bottom: -7px;
    width: 14px;
    height: 14px;
    border-radius: 0 0 3px;
    background: #1c3868;
    transform: rotate(45deg);
}

.callback-widget.is-open .callback-widget__prompt,
.callback-widget.is-prompt-dismissed .callback-widget__prompt {
    opacity: 0;
    pointer-events: none;
    transform: translateY(6px);
    visibility: hidden;
}

.callback-widget__launcher:hover,
.callback-widget__launcher:focus-visible {
    background:
            -webkit-linear-gradient(#ee8207, #fdc604) padding-box,
            -webkit-linear-gradient(90deg, #15479D, #1C3868) border-box;
    background:
            linear-gradient(#ee8207, #fdc604) padding-box,
            linear-gradient(0deg, #15479D, #1C3868) border-box;
    border-color: rgb(0 39 142 / 0.8);
    transform: translateY(-2px);
    box-shadow: 0 11px 28px rgba(28, 56, 104, .38);
}

.callback-widget__launcher:focus-visible,
.callback-widget__prompt-open:focus-visible,
.callback-widget__prompt-close:focus-visible,
.callback-widget__panel-close:focus-visible,
.callback-widget__submit:focus-visible,
.callback-widget__consent button:focus-visible,
.callback-consent-modal button:focus-visible {
    outline: 3px solid rgba(21, 71, 157, .3);
    outline-offset: 3px;
}

.callback-widget__phone {
    display: block;
    width: 29px;
    height: 29px;
}

.callback-widget__launcher-close {
    display: none;
    font-size: 38px;
    font-weight: 300;
    line-height: 1;
    color: #1c3868;
    transform: translateY(-1px);
}

.callback-widget.is-open .callback-widget__phone {
    display: none;
}

.callback-widget.is-open .callback-widget__launcher-close {
    display: block;
}

.callback-widget__panel {
    position: fixed;
    right: calc(10px + env(safe-area-inset-right, 0px));
    bottom: calc(86px + env(safe-area-inset-bottom, 0px));
    display: flex;
    flex-direction: column;
    width: min(410px, calc(100vw - 32px));
    max-height: calc(100vh - 106px - env(safe-area-inset-bottom, 0px));
    max-height: calc(100dvh - 106px - env(safe-area-inset-bottom, 0px));
    overflow: hidden;
    padding: 24px;
    border: 1px solid rgba(28, 56, 104, .14);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 18px 52px rgba(28, 56, 104, .25);
    opacity: 0;
    pointer-events: none;
    transform: translateY(18px) scale(.98);
    transform-origin: right bottom;
    visibility: hidden;
    transition: opacity .22s ease, transform .22s ease, visibility .22s ease;
    z-index: 1;
}

.callback-widget.is-open .callback-widget__panel {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
    visibility: visible;
}

.callback-widget__panel-close,
.callback-consent-modal__close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #1c3868;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
}

.callback-widget__panel-close:hover,
.callback-consent-modal__close:hover {
    background: #f1f4f9;
}

.callback-widget__heading {
    padding-right: 24px;
    margin-bottom: 18px;
}

.callback-widget__heading h2,
.callback-consent-modal__dialog h2 {
    margin: 0 0 6px;
    color: #1c3868;
    font-family: "Montserrat", Arial, sans-serif;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.28;
    text-transform: none;
}

.callback-widget__heading p {
    margin: 0;
    color: #56647a;
    font-size: 14px;
    line-height: 1.5;
}

.callback-widget__form {
    min-height: 0;
    margin: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.callback-widget__field {
    margin: 0 0 13px;
}

.callback-widget__field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.callback-widget__field label,
.callback-widget__field legend {
    display: block;
    width: auto;
    margin: 0 0 5px;
    color: #263c60;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
}

.callback-widget__field label span,
.callback-widget__field legend span {
    color: #7a8495;
    font-size: 11px;
    font-weight: 400;
}

.callback-widget__field label strong {
    color: #b13c30;
}

.callback-widget__field input[type="text"],
.callback-widget__field input[type="tel"] {
    display: block;
    width: 100%;
    height: 42px;
    margin: 0;
    padding: 9px 11px;
    border: 1px solid #c9d1dd;
    border-radius: 8px;
    background: #fff;
    color: #1f2d44;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.4;
    box-shadow: none;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.callback-widget__field input[type="text"]:focus,
.callback-widget__field input[type="tel"]:focus {
    border-color: #15479d;
    outline: 0;
    box-shadow: 0 0 0 3px rgba(21, 71, 157, .13);
}

.callback-widget__field input.is-invalid {
    border-color: #b13c30;
    box-shadow: 0 0 0 3px rgba(177, 60, 48, .1);
}

.callback-widget__sector {
    min-width: 0;
    padding: 0;
    border: 0;
}

.callback-widget__sector-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.callback-widget__sector-options input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.callback-widget__sector-options label {
    margin: 0;
    padding: 9px 12px;
    border: 1px solid #b9c5d7;
    border-radius: 8px;
    color: #1c3868;
    background: #fff;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: color .18s ease, border-color .18s ease, background .18s ease;
}

.callback-widget__sector-options input:checked + label {
    border-color: transparent;
    color: #fff;
    background: linear-gradient(0deg, #1C3868, #15479D);
}

.callback-widget__sector-options input:focus-visible + label {
    outline: 3px solid rgba(21, 71, 157, .25);
    outline-offset: 2px;
}

.callback-widget__consent {
    display: grid;
    grid-template-columns: 20px 1fr;
    align-items: start;
    gap: 2px 8px;
    margin-top: 2px;
}

.callback-widget__consent input {
    width: 17px;
    height: 17px;
    margin: 2px 0 0;
    accent-color: #15479d;
}

.callback-widget__consent label {
    margin: 0;
    color: #3e4d63;
    font-size: 11px;
    font-weight: 400;
    line-height: 1.45;
}

.callback-widget__consent button {
    grid-column: 2;
    justify-self: start;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #15479d;
    font-family: inherit;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.4;
    text-decoration: underline;
    cursor: pointer;
}

.callback-widget__error {
    display: block;
    min-height: 0;
    margin-top: 4px;
    color: #a72e24;
    font-size: 11px;
    line-height: 1.3;
}

.callback-widget__error:empty {
    display: none;
}

.callback-widget__captcha-wrap {
    width: 100%;
    min-height: 78px;
    margin-top: 14px;
    overflow: hidden;
}

.callback-widget__captcha {
    transform-origin: left top;
}

.callback-widget__submit,
.callback-consent-modal__button {
    display: block;
    width: 100%;
    margin: 14px 0 0;
    padding: 11px 18px;
    border: 0;
    border-radius: 9px;
    background: linear-gradient(0deg, #1C3868, #15479D);
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
    text-transform: none;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease;
}

.callback-widget__submit:hover,
.callback-consent-modal__button:hover {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 7px 18px rgba(28, 56, 104, .25);
}

.callback-widget__status {
    margin: 9px 0 0;
    color: #355b2d;
    font-size: 11px;
    line-height: 1.4;
    text-align: center;
}

.callback-consent-modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    font-family: "Montserrat", Arial, sans-serif;
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: opacity .2s ease, visibility .2s ease;
    z-index: 1001;
}

.callback-consent-modal.is-open {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
}

.callback-consent-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(16, 29, 51, .66);
}

.callback-consent-modal__dialog {
    position: relative;
    width: min(520px, 100%);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    padding: 28px;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
    transform: translateY(12px);
    transition: transform .2s ease;
}

.callback-consent-modal.is-open .callback-consent-modal__dialog {
    transform: translateY(0);
}

.callback-consent-modal__dialog p {
    margin: 12px 0 0;
    color: #46556c;
    font-size: 14px;
    line-height: 1.65;
}

.callback-consent-modal__dialog .callback-consent-modal__note {
    padding: 11px 13px;
    background: #fff8e7;
    color: #5e5036;
    font-size: 12px;
}

body.callback-consent-open {
    overflow: hidden;
}

@media (max-width: 480px) {
    .callback-widget__launcher {
        right: calc(10px + env(safe-area-inset-right, 0px));
        width: 48px;
        height: 48px;
    }

    .callback-widget__prompt {
        right: calc(10px + env(safe-area-inset-right, 0px));
        bottom: calc(70px + env(safe-area-inset-bottom, 0px));
        padding: 6px 6px 6px 11px;
        font-size: 12px;
    }

    .callback-widget__prompt::after {
        right: 17px;
    }

    .callback-widget__panel {
        right: calc(10px + env(safe-area-inset-right, 0px));
        bottom: calc(68px + env(safe-area-inset-bottom, 0px));
        width: calc(100vw - 20px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px));
        max-height: calc(100vh - 86px - env(safe-area-inset-bottom, 0px));
        max-height: calc(100dvh - 86px - env(safe-area-inset-bottom, 0px));
        padding: 19px 16px;
        border-radius: 15px;
    }

    .callback-widget__field-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .callback-widget__heading h2 {
        font-size: 18px;
    }

    .callback-consent-modal__dialog {
        padding: 24px 20px;
    }
}

@media (max-width: 359px) {
    .callback-widget__captcha-wrap {
        min-height: 67px;
    }

    .callback-widget__captcha {
        transform: scale(.86);
    }
}

@media (prefers-reduced-motion: reduce) {
    .callback-widget__launcher,
    .callback-widget__prompt,
    .callback-widget__panel,
    .callback-consent-modal,
    .callback-consent-modal__dialog,
    .callback-widget__submit,
    .callback-consent-modal__button {
        transition: none;
    }
}
