



.appt-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.appt-modal[hidden] {
    display: none !important;
}


.appt-modal.is-opening {
    display: flex;
    animation: apptModalFadeIn 0.22s ease forwards;
}

.appt-modal.is-closing {
    animation: apptModalFadeOut 0.18s ease forwards;
}

@keyframes apptModalFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes apptModalFadeOut {
    from { opacity: 1; }
    to   { opacity: 0; }
}



.appt-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(92, 7, 94, 0.45);
    backdrop-filter: blur(3px);
    cursor: pointer;
}



.appt-modal__window {
    position: relative;
    z-index: 1;
    width: 759px;
    background: #FFFFFF;
    border-radius: 25px;
    padding: 45px;
    display: flex;
    flex-direction: column;
    gap: 40px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    box-sizing: border-box;
}

.appt-modal__window::-webkit-scrollbar { display: none; }
.appt-modal__window { scrollbar-width: none; }



.appt-modal__close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    background: #FCF5FC;
    border: none;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease;
    flex-shrink: 0;
}

.appt-modal__close:hover {
    background: #EEE0EE;
    transform: scale(1.08);
}



.appt-modal__head {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    text-align: center;
}

.appt-modal__title {
    font-family: Manrope, sans-serif;
    font-weight: 600;
    font-size: 40px;
    line-height: 45px;
    color: #5C075E;
    margin: 0;
}

.appt-modal__subtitle {
    font-family: Manrope, sans-serif;
    font-weight: 400;
    font-size: 18px;
    line-height: 30px;
    color: #5C075E;
    margin: 0;
}




.appt-modal .wpcf7 {
    margin: 0;
    padding: 0;
}

.appt-modal .wpcf7-form {
    display: flex;
    flex-direction: column;
    gap: 0;
}


.appt-modal__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    width: 100%;
}


.appt-modal .appointment-form__field {
    border: 1px solid #8E468F;
    border-radius: 10px;
    background: #FEFAFF !important;
    padding: 0 14px;
    height: 46px;
    min-height: 46px;
    box-sizing: border-box;
}


.appt-modal .appointment-form__textarea {
    border: 1px solid #8E468F;
    border-radius: 10px;
    padding: 12px 14px 12px 40px;
}


.appt-modal .appointment-form__input,
.appt-modal .appointment-form__textarea {
    color: #5C075E;
}

.appt-modal .appointment-form__input::placeholder,
.appt-modal .appointment-form__textarea::placeholder {
    background: linear-gradient(180deg, #C05FC2 0%, #8D2A8F 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}


.appt-modal .appointment-form__bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
    width: 100%;
    margin-top: 25px;
    margin-left: 0;
    margin-right: 0;
}


.appt-modal .appointment-form__consent-label {
    align-items: center;
}

.appt-modal .appointment-form__consent-box {
    margin-top: 0;
    flex-shrink: 0;
}


.appt-modal .appointment-form__consent-text,
.appt-modal .appointment-form__consent-link {
    color: #5C075E;
    font-size: 16px;
    line-height: 22px;
}

.appt-modal .appointment-form__consent-link {
    color: #8D2A8F;
}


.appt-modal .appointment-form__consent-box {
    border: 1px solid #8E468F;
    border-radius: 2px;
    background: #FCF5FC;
}

.appt-modal .appointment-form__consent-input:checked ~ .appointment-form__consent-box {
    background: #8D2A8F;
    border-color: #8D2A8F;
}

.appt-modal .appointment-form__consent-input:checked ~ .appointment-form__consent-box::after {
    border-color: #FFFFFF;
}

.appt-modal .appointment-form__consent-label.is-checked .appointment-form__consent-box {
    background: #8D2A8F;
    border-color: #8D2A8F;
}

.appt-modal .appointment-form__consent-label.is-checked .appointment-form__consent-box::after {
    border-color: #FFFFFF;
}


.appt-modal .appointment-form__btn {
    flex-shrink: 0;
    width: 250px;
    height: 46px;
    padding: 0 26px;
}


.appt-modal .wpcf7-form.init .wpcf7-response-output { display: none !important; }

.appt-modal .wpcf7-response-output {
    margin: 16px 0 0 !important;
    padding: 12px 18px !important;
    border-radius: 10px;
    font-family: Manrope, sans-serif;
    font-size: 14px;
    color: #5C075E;
    border: 1px solid #D0A0D0 !important;
    background: #FAF0FA;
    box-sizing: border-box;
}

.appt-modal .wpcf7-form.sent .wpcf7-response-output {
    border-color: #8D2A8F !important;
    background: #F5EAF5;
}

.appt-modal .wpcf7-form.invalid .wpcf7-response-output,
.appt-modal .wpcf7-form.failed .wpcf7-response-output {
    border-color: #E08080 !important;
    background: #FFF5F5;
    color: #8B0000;
}

.appt-modal .wpcf7-not-valid-tip {
    font-family: Manrope, sans-serif;
    font-size: 12px;
    color: #C03030;
    margin-top: 4px;
    display: block;
}

.appt-modal .wpcf7-spinner { display: none !important; }

.appt-modal .screen-reader-response {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
}



.appt-modal__no-form {
    font-family: Manrope, sans-serif;
    font-size: 16px;
    color: #8E468F;
    text-align: center;
}



@media (max-width: 840px) {
    .appt-modal__window {
        width: 620px;
        max-width: 100%;
        padding: 35px;
        gap: 30px;
        border-radius: 20px;
    }

    .appt-modal__head {
        gap: 15px;
    }

    .appt-modal__title {
        font-size: 30px;
        line-height: 35px;
    }

    .appt-modal__subtitle {
        font-size: 14px;
        line-height: 22px;
    }

    .appt-modal__grid {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }

    .appt-modal .appointment-form__field {
        height: 36px;
        min-height: 36px;
        border-radius: 8px;
    }

    .appt-modal .appointment-form__input {
        font-size: 12px;
        min-height: 36px;
    }

    .appt-modal .appointment-form__textarea {
        border-radius: 8px;
        height: 89px;
        font-size: 12px;
    }

    .appt-modal .appointment-form__phone-toggle {
        font-size: 11px;
        padding: 6px 8px;
        border-radius: 6px;
    }

    .appt-modal .appointment-form__bottom {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 25px;
        margin-top: 0;
    }

    .appt-modal .appointment-form__consent-text,
    .appt-modal .appointment-form__consent-link {
        font-size: 12px;
        line-height: 16px;
    }

    .appt-modal .appointment-form__consent-box {
        width: 15px;
        height: 15px;
    }

    .appt-modal .appointment-form__btn {
        width: auto;
        height: 36px;
        padding: 10px 20px;
        font-size: 12px;
        border-radius: 8px;
    }
}

@media (max-width: 480px) {
    .appt-modal {
        padding: 12px;
    }

    .appt-modal__window {
        width: 100%;
        padding: 20px;
        gap: 25px;
        border-radius: 15px;
    }

    .appt-modal__head {
        gap: 10px;
    }

    .appt-modal__title {
        font-size: 24px;
        line-height: 27px;
    }

    .appt-modal__subtitle {
        font-size: 12px;
        line-height: 22px;
    }

    .appt-modal__grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .appt-modal .appointment-form__bottom {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }

    .appt-modal .appointment-form__btn {
        width: 100%;
    }
}