.callback-popup[hidden] {
    display: none !important;
}

.callback-popup {
    position: fixed;
    right: 1rem;
    bottom: 170px;
    left: auto;
    top: 7.3rem;
    height: fit-content;
    display: block;
    width: min(465px, calc(100vw - 20px));
    padding: 0;
    pointer-events: none;
    z-index: 99999;
}

.callback-popup__dialog {
    width: 100%;
    max-width: none;
    max-height: calc(100dvh - 180px);
    pointer-events: auto;
    background: #101315;
    padding: 2rem;
    border-radius: 2rem;
    border: 1px solid #2b322e;
}

.callback-popup__close {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    width: 35px;
    height: 35px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    background: transparent;
    color: #c6ccca;
    cursor: pointer;
    transition: border-color .2s, color .2s;
}

.callback-popup__close:hover {
    border-color: #8ec943;
    color: #8ec943;
}

.callback-popup__title {
    margin: 0;
    color: #f5f5f5;
    font-size: clamp(22px, 5vw, 26px);
    font-weight: 800;
    line-height: .98;
    text-align: center;
    letter-spacing: -.6px;
}

.callback-popup__title span {
    color: #8dc845;
}

.callback-popup__description {
    margin: 2rem 0;
    color: #aeb5b2;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
    text-align: center;
}

.callback-form {
    width: 100%;
}

.callback-form__field {
    position: relative;
    padding: 11px 15px 9px;
    border: 1px solid #2c3430;
    border-radius: 13px;
    background: #1c2220;
    text-align: left;
    transition: border-color .2s;
}

.callback-form__field:focus-within {
    border-color: #8dc845;
}

.callback-form__label {
    display: block;
    margin-bottom: 2px;
    color: #a3aaa6;
    font-size: 11px;
    line-height: 1.4;
    cursor: text;
}

.callback-form__field .wpcf7-form-control-wrap {
    display: block;
}

.callback-form__phone {
    display: block;
    width: 100%;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    outline: none !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #f5f5f5 !important;
    font-family: inherit;
    font-size: 1.8rem !important;
    font-weight: 400;
    line-height: 23px;
}

.callback-form__phone::placeholder {
    color: #707b75;
    opacity: 1;
}

.callback-form__options {
    display: flex;
    min-height: 65px;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin: 0 0 0;
}

.callback-form__option {
    padding: 0;
    border: 0;
    background: transparent;
    color: #e4e6e4;
    font-family: inherit;
    font-size: 1.6rem;
    white-space: nowrap;
    cursor: pointer;
}

.callback-form__option:hover,
.callback-form__option.is-active {
    color: #8dc845;
    text-decoration: underline;
    text-underline-offset: 6px;
}

.callback-form__schedule {
    display: flex;
    align-items: center;
    gap: 13px;
    padding-left: 15px;
    border-left: 1px solid #303735;
}

.callback-form__time {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #8dc845;
    font-size: 1.6rem;
}

.callback-form__time .wpcf7-form-control-wrap {
    display: inline-flex;
}

.callback-form__select {
    width: 25px;
    min-width: 0;
    padding: 0 0 2px !important;
    appearance: none;
    border: 0 !important;
    border-bottom: 1px solid #8dc845 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #8dc845 !important;
    font-family: inherit;
    font-size: 1.6rem !important;
    font-weight: 600;
    line-height: 1.5;
    text-align: center;
    cursor: pointer;
}

.callback-form__select option {
    background: #1c2220;
    color: #f5f5f5;
}

.callback-form__submit {
    margin-top: 0;
}

.callback-form__button {
    display: flex !important;
    width: 100% !important;
    min-height: 49px;
    align-items: center;
    justify-content: center;
    margin: 0 !important;
    padding: 12px 18px !important;
    border: 0 !important;
    border-radius: 12px !important;
    background: #8dc845 !important;
    box-shadow: none !important;
    color: #080c08 !important;
    font-family: inherit;
    font-size: 14px !important;
    font-weight: 700 !important;
    line-height: 1.4;
    text-transform: none !important;
    cursor: pointer;
    transition: background .2s, transform .2s;
}

.callback-form__button:hover {
    background: #9bd955 !important;
    transform: translateY(-1px);
}

.callback-form__button:disabled {
    opacity: .65;
    cursor: not-allowed;
    transform: none;
}

.callback-form__privacy {
    margin: 17px 0 0;
    color: #818984;
    font-size: 1.2rem;
    line-height: 1.5;
}

.callback-form__privacy a {
    color: #8dc845;
    text-decoration: underline;
}

.callback-form__antispam {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.callback-popup .wpcf7-spinner {
    display: none;
}

.callback-popup .wpcf7-not-valid-tip {
    margin-top: 7px;
    color: #ff9292;
    font-size: 11px;
}

.callback-popup .wpcf7-response-output {
    margin: 12px 0 0 !important;
    padding: 10px !important;
    border: 1px solid #8dc845 !important;
    border-radius: 8px;
    color: #d6ded3;
    font-size: 12px;
    line-height: 1.5;
}

.callback-popup .wpcf7-form-control-wrap {
    position: relative;
}

.callback-popup__dialog:focus {
    outline: none;
}

.callback-form__option[hidden] {
    display: none !important;
}

.callback-form__options.is-outside-working-hours .callback-form__schedule {
    padding-left: 0;
    border-left: 0;
}

body.callback-popup-open {
    overflow: hidden;
}

@media (max-width: 640px) {
    .callback-popup {
        right: 1rem;
        left: 1rem;
        width: auto;
    }

    .callback-popup__dialog {
        max-height: calc(100dvh - 180px);
        padding: 2.5rem 2rem;
    }

    .callback-popup__description {
        margin: 18px 0 22px;
        font-size: 13px;
    }

    .callback-form__options {
        flex-wrap: wrap;
        gap: 12px;
        padding: 17px 0;
    }

    .callback-form__schedule {
        gap: 10px;
        padding-left: 12px;
    }
}

@media (max-width: 360px) {
    .callback-form__options {
        flex-direction: column;
    }

    .callback-form__schedule {
        padding-left: 0;
        border-left: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .callback-popup *,
    .callback-popup *::before,
    .callback-popup *::after {
        transition: none !important;
    }
}
