.appointment-form {
    background: #FCF5FC;
}

.appointment-form__content {
    background: #8D2A8F;
    border-radius: 25px;
    padding: 70px 80px 80px;
    position: relative;
    overflow: hidden;
}

.appointment-form__tooth {
    position: absolute;
    background: url("../img/normal-tooth.png") no-repeat center / contain;
    opacity: 0.18;
    pointer-events: none;
    z-index: 0;
}

.appointment-form__tooth--left {
    width: 220px;
    height: 300px;
    top: 18%;
    left: -10px;
    transform: translateY(-50%) rotate(19deg);
}

.appointment-form__tooth--right {
    width: 220px;
    height: 280px;
    top: 85%;
    right: -10px;
    transform: translateY(-50%) rotate(-21deg);
}

.appointment-form__title {
    font-family: Manrope, sans-serif;
    font-weight: 600;
    font-size: 55px;
    line-height: 64px;
    letter-spacing: 0;
    text-align: center;
    color: #FCF5FC;
    margin: 0;
    position: relative;
    z-index: 2;
}

.appointment-form__subtitle {
    font-family: Manrope, sans-serif;
    font-weight: 500;
    font-size: 18px;
    line-height: 30px;
    letter-spacing: 0;
    text-align: center;
    color: #FCF5FC;
    margin: 20px 0 0;
    position: relative;
    z-index: 2;
}

.appointment-form__form {
    position: relative;
    z-index: 2;
    margin-top: 50px;
}

.appointment-form__grid {
    display: grid;
    grid-template-columns: 387px 387px;
    gap: 25px;
    width: 799px;
    margin: 0 auto;
}

.appointment-form__field {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #FEFAFF !important;
    border-radius: 8px;
    padding: 0 14px;
    min-height: 46px;
    height: 46px;
    position: relative;
    box-sizing: border-box;
    width: 100%;
}

.appointment-form__field-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.appointment-form__input {
    flex: 1;
    min-width: 0;
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    font-family: Manrope, sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1;
    color: #8D2A8F;
    padding: 0;
    min-height: 46px;
}

.appointment-form__input::placeholder {
    color: #B451B5;
}

.appointment-form__field .wpcf7-not-valid-tip {
    position: absolute;
    bottom: -17px;
    left: 0;
    font-family: Manrope, sans-serif;
    font-size: 12px;
    color: #FFD0D0;
    white-space: nowrap;
}

.appointment-form__field input.wpcf7-not-valid,
.appointment-form__field input.wpcf7-not-valid:focus {
    outline: 1px solid rgba(255, 150, 150, 0.5);
}

.appointment-form__field--phone {
    gap: 6px;
}

.appointment-form__phone-toggle {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    background: linear-gradient(180deg, #BD5CBF 0%, #963499 100%);
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-family: Manrope, sans-serif;
    font-weight: 500;
    font-size: 14px;
    line-height: 1;
    color: #FCF5FC;
    white-space: nowrap;
    user-select: none;
    position: relative;
}

.appointment-form__phone-toggle-arrow {
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid #FCF5FC;
    display: inline-block;
    transition: transform 0.2s ease;
}

.appointment-form__phone-toggle.open .appointment-form__phone-toggle-arrow {
    transform: rotate(180deg);
}

.appointment-form__phone-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    background: #FEFAFF;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(141, 42, 143, 0.18);
    z-index: 30;
    min-width: 110px;
    display: none;
}

.appointment-form__phone-toggle.open .appointment-form__phone-dropdown {
    display: block;
}

.appointment-form__phone-option {
    padding: 10px 14px;
    font-family: Manrope, sans-serif;
    font-weight: 500;
    font-size: 14px;
    color: #8D2A8F;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s ease;
}

.appointment-form__phone-option:hover {
    background: rgba(141, 42, 143, 0.08);
}

.appointment-form__phone-option.active {
    background: rgba(141, 42, 143, 0.12);
    font-weight: 600;
}

.appointment-form__custom-select {
    flex: 1;
    min-width: 0;
    position: relative;
}

.appointment-form__select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    min-height: 46px;
}

.appointment-form__select-value {
    flex: 1;
    font-family: Manrope, sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1;
    color: #B451B5;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.appointment-form__select-value.selected {
    color: #8D2A8F;
}

.appointment-form__select-arrow {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    transition: transform 0.2s ease;
}

.appointment-form__custom-select.open .appointment-form__select-arrow {
    transform: rotate(180deg);
}

.appointment-form__select-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: -14px;
    right: -14px;
    background: #FEFAFF;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(141, 42, 143, 0.18);
    z-index: 20;
    max-height: 220px;
    overflow-y: auto;
    display: none;
}

.appointment-form__custom-select.open .appointment-form__select-dropdown {
    display: block;
}

.appointment-form__select-option {
    padding: 10px 14px;
    font-family: Manrope, sans-serif;
    font-weight: 400;
    font-size: 15px;
    color: #8D2A8F;
    cursor: pointer;
    transition: background 0.15s ease;
}

.appointment-form__select-option:hover {
    background: rgba(141, 42, 143, 0.08);
}

.appointment-form__select-option.active {
    background: rgba(141, 42, 143, 0.12);
    font-weight: 500;
}

.appointment-form__textarea-wrap {
    grid-column: 1 / -1;
    width: 100%;
}

.appointment-form__textarea-field {
    position: relative;
}

.appointment-form__textarea-icon {
    position: absolute;
    left: 14px;
    top: 14px;
    display: flex;
    align-items: flex-start;
    pointer-events: none;
    z-index: 1;
}

.appointment-form__textarea {
    width: 100%;
    box-sizing: border-box;
    background: #FEFAFF;
    border: none;
    border-radius: 8px;
    outline: none;
    font-family: Manrope, sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.5;
    color: #8D2A8F;
    padding: 14px 14px 14px 40px;
    resize: none;
    height: 108px;
    min-height: 108px;
    max-height: 108px;
    display: block;
}

.appointment-form__textarea::placeholder {
    color: #B451B5;
}

.appointment-form__bottom {
    display: flex;
    align-items: center;
    gap: 95px;
    margin-top: 29px;
    width: 799px;
    margin-left: auto;
    margin-right: auto;
}

.appointment-form__consent {
    flex: 1;
    min-width: 0;
}

.appointment-form__consent-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    position: relative;
}

.appointment-form__consent-input {
    position: absolute;
    top: 1px;
    left: 0;
    width: 18px;
    height: 18px;
    opacity: 0;
    cursor: pointer;
    z-index: 10;
    margin: 0;
    pointer-events: auto;
}

.appointment-form__consent-box {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin-top: 1px;
    border: 2px solid rgba(252, 245, 252, 0.6);
    border-radius: 4px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.appointment-form__consent-input:checked ~ .appointment-form__consent-box {
    background: rgba(252, 245, 252, 0.25);
    border-color: #FCF5FC;
}

.appointment-form__consent-input:checked ~ .appointment-form__consent-box::after {
    content: '';
    display: block;
    width: 9px;
    height: 6px;
    border-left: 2px solid #FCF5FC;
    border-bottom: 2px solid #FCF5FC;
    transform: rotate(-45deg) translateY(-1px);
}

.appointment-form__consent-label.is-checked .appointment-form__consent-box {
    background: rgba(252, 245, 252, 0.25);
    border-color: #FCF5FC;
}

.appointment-form__consent-label.is-checked .appointment-form__consent-box::after {
    content: '';
    display: block;
    width: 9px;
    height: 6px;
    border-left: 2px solid #FCF5FC;
    border-bottom: 2px solid #FCF5FC;
    transform: rotate(-45deg) translateY(-1px);
}

.appointment-form__consent-text {
    font-family: Manrope, sans-serif;
    font-weight: 500;
    font-size: 16px;
    line-height: 1;
    color: #FCF5FC;
}

.appointment-form__consent-link {
    font-family: Manrope, sans-serif;
    font-weight: 500;
    font-size: 16px;
    line-height: 1;
    color: #FFA4FF;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: opacity 0.2s ease;
}

.appointment-form__consent-link:hover {
    opacity: 0.8;
}

.appointment-form__btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 40px;
    background: linear-gradient(180deg, #DA81DB 0%, #A642A8 100%);
    border: none;
    border-radius: 10px;
    font-family: Manrope, sans-serif;
    font-weight: 600;
    font-size: 16px;
    line-height: 1;
    color: #FFFFFF;
    cursor: pointer;
    white-space: nowrap;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.appointment-form__btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(218, 129, 219, 0.4);
}

.appointment-form__btn:disabled,
.wpcf7-form.submitting .appointment-form__btn {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

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

.appointment-form .wpcf7 {
    margin: 0;
    padding: 0;
}

.appointment-form .wpcf7-form {
    position: relative;
    z-index: 2;
    margin-top: 50px;
}

.appointment-form .wpcf7-form .appointment-form__grid {
    display: grid;
    grid-template-columns: 387px 387px;
    gap: 25px;
    width: 799px;
    margin: 0 auto;
}

.appointment-form .wpcf7-form-control-wrap {
    display: block;
    position: relative;
}

.appointment-form__field .wpcf7-form-control-wrap {
    position: static;
    display: flex;
    flex: 1;
    min-width: 0;
    align-items: center;
}

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

.appointment-form .wpcf7-spinner {
    display: none !important;
}

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

.appointment-form .wpcf7-response-output {
    width: 799px;
    margin: 20px auto 0 !important;
    padding: 14px 20px !important;
    border-radius: 10px;
    font-family: Manrope, sans-serif;
    font-weight: 500;
    font-size: 15px;
    text-align: center;
    background: rgba(252, 245, 252, 0.15);
    color: #FCF5FC;
    border: 1px solid rgba(252, 245, 252, 0.3) !important;
    box-sizing: border-box;
}

.appointment-form .wpcf7-form.sent .wpcf7-response-output {
    background: rgba(252, 245, 252, 0.2);
    color: #FCF5FC;
    border: 1px solid rgba(252, 245, 252, 0.4) !important;
}

.appointment-form .wpcf7-form.invalid .wpcf7-response-output {
    background: rgba(252, 245, 252, 0.12);
    color: #FCF5FC;
    border: 1px solid rgba(252, 245, 252, 0.25) !important;
}

.appointment-form .wpcf7-form.failed .wpcf7-response-output,
.appointment-form .wpcf7-form.spam  .wpcf7-response-output {
    background: rgba(255, 100, 100, 0.15);
    color: #FFD0D0;
    border: 1px solid rgba(255, 100, 100, 0.3) !important;
}

.appointment-form__field input.wpcf7-not-valid,
.appointment-form__field input.wpcf7-not-valid:focus {
    outline: none !important;
}

@media (max-width: 1024px) {
    .appointment-form__content {
        border-radius: 20px;
        padding: 50px 40px;
    }

    .appointment-form__title {
        font-size: 34px;
        line-height: 46px;
        font-weight: 700;
    }

    .appointment-form__subtitle {
        font-size: 14px;
        line-height: 22px;
        margin-top: 10px;
    }

    .appointment-form__form,
    .appointment-form .wpcf7-form {
        margin-top: 35px;
    }

    .appointment-form__grid,
    .appointment-form .wpcf7-form .appointment-form__grid {
        grid-template-columns: 1fr 1fr;
        width: 100%;
        max-width: 585px;
        gap: 25px 25px;
    }

    .appointment-form__field {
        min-height: 36px;
        height: 36px;
        padding: 0 16px;
    }

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

    .appointment-form__textarea {
        font-size: 12px;
        height: 89px;
        min-height: 89px;
        max-height: 89px;
        padding: 10px 16px 10px 36px;
    }

    .appointment-form__textarea-icon {
        left: 16px;
        top: 10px;
    }

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

    .appointment-form__select-value {
        font-size: 12px;
    }

    .appointment-form__bottom {
        width: 100%;
        max-width: 585px;
        gap: 12px;
        margin-top: 15px;
        justify-content: space-between;
    }

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

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

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

    .appointment-form__consent-input {
        width: 15px;
        height: 15px;
    }

    .appointment-form__btn {
        padding: 10px 20px;
        font-size: 12px;
        border-radius: 8px;
    }

    .appointment-form .wpcf7-response-output {
        width: 100%;
        max-width: 585px;
    }
}

@media (max-width: 576px) {
    .appointment-form__content {
        border-radius: 20px;
        padding: 40px 20px;
    }

    .appointment-form__title {
        font-size: 24px;
        line-height: 27px;
        font-weight: 700;
        text-align: left;
    }

    .appointment-form__subtitle {
        font-size: 12px;
        line-height: 18px;
        text-align: left;
        margin-top: 10px;
    }

    .appointment-form__form,
    .appointment-form .wpcf7-form {
        margin-top: 25px;
    }

    .appointment-form__grid,
    .appointment-form .wpcf7-form .appointment-form__grid {
        grid-template-columns: 1fr;
        width: 100%;
        gap: 15px;
    }

    .appointment-form__field {
        min-height: 36px;
        height: 36px;
        padding: 0 16px;
    }

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

    .appointment-form__textarea {
        font-size: 12px;
        height: 89px;
        min-height: 89px;
        max-height: 89px;
        padding: 10px 16px 10px 36px;
    }

    .appointment-form__textarea-icon {
        left: 16px;
        top: 10px;
    }

    .appointment-form__textarea-wrap {
        grid-column: 1;
    }

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

    .appointment-form__select-value {
        font-size: 12px;
    }

    .appointment-form__bottom {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        margin-top: 15px;
    }

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

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

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

    .appointment-form__consent-input {
        width: 15px;
        height: 15px;
    }

    .appointment-form__consent {
        margin-left: -25px;
    }

    .appointment-form__btn {
        width: 100%;
        padding: 10px 20px;
        font-size: 12px;
        border-radius: 8px;
    }

    .appointment-form .wpcf7-response-output {
        width: 100%;
    }
}