/* Модальное окно */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: var(--z-modal);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}
.modal-review {
    position: relative;
    width: 520px;
    height: 779.86px;
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: 35px 45px;
    box-shadow: var(--shadow-2xl);
    transform: scale(0.8) translateY(-50px);
    opacity: 0;
    transition: all 0.3s ease;
}
.modal-overlay.active .modal-review {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* Кнопка закрытия */

.modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 20px;
    height: 20px;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}
.modal-close:hover {
    transform: rotate(90deg);
}

/* Форма отзыва */

.review-form {
    display: flex;
    flex-direction: column;
    gap: 29px;
    height: 100%;
}
.review-form__title {
    font-family: var(--font-family-primary);
    font-weight: var(--font-weight-bold);
    font-size: var(--font-size-3xl);
    line-height: 1.22;
    text-align: center;
    color: var(--Text);
    margin: 0;
}
.review-form__content {
    display: flex;
    flex-direction: column;
    gap: 40px;
    flex: 1;
}

/* Аватар и рейтинг */

.review-form__rating {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}
.user-avatar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}
.avatar-image {
    position: relative;
    width: 78px;
    height: 78px;
}
.avatar-image img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}
.avatar-social {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #ED416A;
    display: flex;
    align-items: center;
    justify-content: center;
}
.social-icon--instagram {
    width: 18px;
    height: 18px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M12 2.163c3.204 0 3.584.012 4.85.07 3.252.148 4.771 1.691 4.919 4.919.058 1.265.069 1.645.069 4.849 0 3.205-.012 3.584-.069 4.849-.149 3.225-1.664 4.771-4.919 4.919-1.266.058-1.644.07-4.85.07-3.204 0-3.584-.012-4.849-.07-3.26-.149-4.771-1.699-4.919-4.92-.058-1.265-.07-1.644-.07-4.849 0-3.204.013-3.583.07-4.849.149-3.227 1.664-4.771 4.919-4.919 1.266-.057 1.645-.069 4.849-.069zm0-2.163c-3.259 0-3.667.014-4.947.072-4.358.2-6.78 2.618-6.98 6.98-.059 1.281-.073 1.689-.073 4.948 0 3.259.014 3.668.072 4.948.2 4.358 2.618 6.78 6.98 6.98 1.281.058 1.689.072 4.948.072 3.259 0 3.668-.014 4.948-.072 4.354-.2 6.782-2.618 6.979-6.98.059-1.28.073-1.689.073-4.948 0-3.259-.014-3.667-.072-4.947-.196-4.354-2.617-6.78-6.979-6.98-1.281-.059-1.69-.073-4.949-.073zm0 5.838c-3.403 0-6.162 2.759-6.162 6.162s2.759 6.163 6.162 6.163 6.162-2.759 6.162-6.163c0-3.403-2.759-6.162-6.162-6.162zm0 10.162c-2.209 0-4-1.79-4-4 0-2.209 1.791-4 4-4s4 1.791 4 4c0 2.21-1.791 4-4 4zm6.406-11.845c-.796 0-1.441.645-1.441 1.44s.645 1.44 1.441 1.44c.795 0 1.439-.645 1.439-1.44s-.644-1.44-1.439-1.44z"/></svg>') no-repeat center;
    background-size: contain;
}
.user-name {
    font-family: var(--font-family-primary);
    font-weight: 400;
    font-size: 20px;
    line-height: 1;
    color: var(--Text);
}
.stars {
    display: flex;
    gap: 4px;
    align-items: center;
}
.star {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: transform 0.2s ease;
}
.star:hover {
    transform: scale(1.1);
}
.star.active svg path {
    fill: #FFE262;
}
.star:not(.active) svg path {
    fill: #F4F3F8;
}

/* Поля формы */

.review-form__fields {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.form-field {
    display: flex;
    flex-direction: column;
    gap: 13px;
}
.form-field__label {
    font-family: var(--font-family-primary);
    font-weight: 400;
    font-size: 16px;
    line-height: 1;
    color: #1F272A;
}
.form-field__input-wrapper {
    background: #F4F3F8;
    border-radius: 12px;
    padding: 15px;
    width: 100%;
    box-sizing: border-box;
}
.form-field__input,
.form-field__textarea {
    width: 100%;
    background: none;
    border: none;
    outline: none;
    font-family: var(--font-family-primary);
    font-weight: 400;
    font-size: 14px;
    line-height: 1.4;
    color: #1F272A;
    resize: none;
}
.input-simple {
    width: 100%;
    border: none;
    outline: none;
    font-family: var(--font-family-primary);
    font-weight: 400;
    font-size: 14px;
    line-height: 1.4;
    color: #1F272A;
    resize: none;
    background: #F4F3F8;
    padding: 15px;
    border-radius: 12px;
}
textarea.input-simple {
    height: 98px;
}
.form-field__input::placeholder,
.form-field__textarea::placeholder {
    color: #797A7F;
}
.form-field__textarea {
    min-height: 60px;
    height: auto;
}
.form-field__email-wrapper {
    background: #F4F3F8;
    border-radius: 12px;
    padding: 15px;
    width: 100%;
    box-sizing: border-box;
}

/* Социальные сети */

.social-login {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 10px;
}
.social-login__text {
    font-family: var(--font-family-primary);
    font-weight: 400;
    font-size: 16px;
    line-height: 1;
    color: #1F272A;
    white-space: nowrap;
}
.social-login__buttons {
    display: flex;
    gap: 11px;
    align-items: center;
}
.social-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}
.social-btn:hover {
    transform: scale(1.1);
}
.social-btn--vk {
    background: #45658D;
}
.social-btn--facebook {
    background: #334C98;
}
.social-btn--odnoklassniki {
    background: #F77B01;
}
.social-btn--yandex {
    background: #FF0000;
}

/* Кнопки и чекбоксы */

.review-form__actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 49px;
}
.review-form__buttons {
    display: flex;
    gap: 15px;
    align-items: center;
}
.btn {
    padding: 16px 20px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-family: var(--font-family-primary);
    font-weight: 700;
    font-size: 16px;
    line-height: 1;
    transition: all 0.3s ease;
}
.btn--primary {
    background: #059669;
    color: #FFFFFF;
    width: 122px;
    height: 50px;
}
.btn--primary:hover {
    background: #047857;
}
.btn--secondary {
    background: #F4F3F8;
    color: #1F272A;
    width: 145px;
    height: 50px;
}
.btn--secondary:hover {
    background: #E8E7F0;
}
.review-form__checkbox {
    display: flex;
    align-items: center;
}

/* Чекбоксы */

.checkbox {
    display: flex;
    align-items: center;
    gap: 11px;
    cursor: pointer;
    font-family: var(--font-family-primary);
    font-weight: 400;
    font-size: 16px;
    line-height: 1.4;
    color: #1F272A;
}
.checkbox__input {
    display: none;
}
.checkbox__checkmark {
    width: 18px;
    height: 18px;
    border: 1px solid #DADADA;
    border-radius: 2px;
    background: #F0F4FF;
    position: relative;
    flex-shrink: 0;
}
.checkbox__input:checked + .checkbox__checkmark::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 14px;
    height: 14px;
    background: #25CD25;
    border-radius: 1px;
}
.checkbox__checkmark--agreement {
    margin-top: 2px;
    background: #25CD25;
    border-color: #25CD25;
}
.checkbox__input:checked + .checkbox__checkmark--agreement::after {
    content: '✓';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: none;
    color: white;
    font-size: 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}
.checkbox--agreement {
    align-items: flex-start;
    gap: 11px;
}
.checkbox__text--agreement {
    font-size: 14px;
    line-height: 1.4;
    color: #4B4E55;
    opacity: 0.5;
    flex: 1;
}
.privacy-link {
    color: #4B4E55;
    text-decoration: none;
    opacity: 0.5;
}
.privacy-link:hover {
    opacity: 1;
}
/* Согласие */

.review-form__agreement {
    margin-top: auto;
}

/* Кнопка открытия модального окна */

.open-modal-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    padding: 12px 24px;
    background: #059669;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: var(--font-family-primary);
    font-weight: 500;
    font-size: 16px;
    z-index: 999;
}
.open-modal-btn:hover {
    background: #047857;
}

/* Адаптивность */

@media (max-width: 768px) {
    .modal-review {
        width: 90%;
        max-width: 400px;
        height: auto;
        max-height: 90vh;
        padding: 20px;
        overflow-y: auto;
    }
    .review-form__title {
        font-size: 24px;
    }
    .review-form__actions {
        flex-direction: column;
        gap: 20px;
        align-items: stretch;
    }
    .review-form__buttons {
        justify-content: center;
    }
    .social-login__buttons {
        justify-content: center;
    }
}

/* === Inline styles moved from footer.php for performance === */
.simple-form-buttons {
    display: flex !important;
    gap: 10px !important;
    width: 100% !important;
}
.simple-form-btn {
    flex: 1 !important;
    width: 50% !important;
    min-width: auto !important;
}

