/* Базовые стили для всех форм обратной связи */
.feedback-form-wrapper {
    max-width: 100%;
    margin: 20px 0;
    padding: 30px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.feedback-form-modern {
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.feedback-form-minimal {
    border-radius: 8px;
    border: 1px solid #e5e5e5;
    padding: 20px;
}

.feedback-form-popup {
    max-width: 480px;
    margin: 0 auto;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

/* Стили для Popup Overlay */
.feedback-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9998;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.feedback-popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

.feedback-popup-container {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    overflow: auto;
}

.feedback-popup-content {
    position: relative;
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: popupFadeIn 0.3s ease-out;
}

@keyframes popupFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.feedback-popup-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 28px;
    color: #666;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
    z-index: 9999;
}

.feedback-popup-close:hover {
    color: #333;
}

/* Стили для кнопки открытия Popup */
.feedback-popup-trigger {
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    text-align: center;
    text-decoration: none;
    font-family: inherit;
}

.feedback-popup-trigger:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Убираем кнопки popup из обычных форм */
.feedback-form-modern .feedback-popup-trigger,
.feedback-form-minimal .feedback-popup-trigger {
    display: none !important;
}

/* Заголовки форм */
.feedback-form-header {
    text-align: center;
    margin-bottom: 30px;
}

/* Базовые стили заголовка - УБИРАЕМ ВСЕ ГРАДИЕНТЫ */
.feedback-form-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #1a1a1a;
    /* Убираем все градиенты полностью */
    background: none !important;
    -webkit-background-clip: unset !important;
    -webkit-text-fill-color: inherit !important;
    background-clip: unset !important;
}

.feedback-form-minimal .feedback-form-title {
    font-size: 1.25rem;
    margin-bottom: 20px;
    text-align: left;
}

.feedback-form-subtitle {
    font-size: 1rem;
    color: #666;
    line-height: 1.5;
}

/* Сетка полей */
.form-fields-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-field {
    display: flex;
    flex-direction: column;
}

.form-field.full-width {
    grid-column: 1 / -1;
}

.form-field label {
    margin-bottom: 8px;
    font-weight: 500;
    color: inherit;
}

/* Поля ввода */
.form-field input,
.form-field textarea {
    width: 100%;
    padding: 12px 16px;
    font-size: 1rem;
    border: 2px solid;
    background: rgba(255, 255, 255, 0.8);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    font-family: inherit;
    box-sizing: border-box;
}

.form-field input:focus,
.form-field textarea:focus {
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.form-field input::placeholder,
.form-field textarea::placeholder {
    color: #9ca3af;
    transition: all 0.3s ease;
}

.form-field input:focus::placeholder,
.form-field textarea:focus::placeholder {
    transform: translateX(10px);
    opacity: 0.7;
}

/* Стили для ошибок валидации */
.field-error-highlight {
    border-color: #dc3232 !important;
    background: #fef2f2 !important;
}

.field-error {
    display: none;
    color: #dc3232;
    font-size: 12px;
    margin-top: 5px;
    font-weight: 500;
}

.field-errors {
    display: none;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 12px;
    margin-top: 15px;
}

.field-errors .error-list {
    margin: 0;
    padding-left: 20px;
}

.field-errors .error-item {
    color: #dc3232;
    font-size: 14px;
    margin-bottom: 5px;
}

/* Honeypot поле - должно быть скрыто */
.form-honeypot {
    position: absolute !important;
    left: -9999px !important;
    opacity: 0 !important;
    height: 0 !important;
    width: 0 !important;
    overflow: hidden !important;
}

/* Кнопки */
.submit-button-container {
    margin-top: 20px;
}

.submit-button-container button {
    width: 100%;
    padding: 15px 30px;
    font-size: 1.125rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.submit-button-container button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.submit-button-container button:active {
    transform: translateY(0);
}

.submit-button-container button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.submit-button-container button:hover::before {
    left: 100%;
}

/* УЛУЧШЕННЫЕ СТИЛИ ДЛЯ ЧЕКБОКСОВ */
.policy-field {
    margin: 25px 0;
    padding: 20px;
    background: #f8fafc;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
}

.policy-field:hover {
    border-color: #cbd5e0;
    background: #f1f5f9;
}

.policy-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    cursor: pointer;
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
}

.policy-checkbox input[type="checkbox"] {
    display: none;
}

/* УЛУЧШЕННЫЙ ЧЕКБОКС */
.checkmark {
    width: 24px;
    height: 24px;
    border: 2px solid #94a3b8;
    border-radius: 6px;
    position: relative;
    flex-shrink: 0;
    margin-top: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.policy-checkbox:hover .checkmark {
    border-color: #667eea;
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.2);
}

.policy-checkbox input[type="checkbox"]:checked + .checkmark {
    background: #667eea;
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.policy-checkbox input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    color: white;
    font-size: 16px;
    font-weight: bold;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* ВЫДЕЛЕННЫЕ ССЫЛКИ В ПОЛИТИКЕ */
.policy-text {
    color: #475569;
    font-weight: 500;
}

.policy-text a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    padding: 2px 4px;
    border-radius: 4px;
    transition: all 0.3s ease;
    background: linear-gradient(120deg, transparent, rgba(102, 126, 234, 0.1), transparent);
    background-size: 200% 100%;
    background-position: -100% 0;
}

.policy-text a:hover {
    color: #5a67d8;
    text-decoration: none;
    background-position: 0 0;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

/* Стили для Popup формы */
.connection__wrap__title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1a1a1a;
    text-align: center;
    margin-bottom: 2rem;
    /* Убираем все градиенты полностью */
    background: none !important;
    -webkit-background-clip: unset !important;
    -webkit-text-fill-color: inherit !important;
    background-clip: unset !important;
}

.connection__wrap__form__item {
    position: relative;
    margin-bottom: 1.5rem;
}

.connection__wrap__form__item__input {
    width: 100%;
    padding: 1rem 1.25rem;
    font-size: 1rem;
    border: 2px solid;
    background: #f8f9fa;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    font-family: inherit;
}

.connection__wrap__form__item__input:focus {
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.connection__wrap__form__item__input::placeholder {
    color: #9ca3af;
    transition: all 0.3s ease;
}

.connection__wrap__form__item__input:focus::placeholder {
    transform: translateX(10px);
    opacity: 0.7;
}

/* УЛУЧШЕННЫЙ ЧЕКБОКС ДЛЯ POPUP ФОРМЫ */
.personal-data-cont {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin: 2.5rem 0;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
}

.personal-data-cont:hover {
    border-color: #cbd5e0;
    background: #f1f5f9;
}

.personal-data-cont input[type="checkbox"] {
    display: none;
}

/* УЛУЧШЕННЫЙ ЧЕКБОКС ДЛЯ POPUP */
.personal-data-check {
    width: 24px;
    height: 24px;
    border: 2px solid #94a3b8;
    border-radius: 6px;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    margin-top: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.personal-data-check:hover {
    border-color: #667eea;
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.2);
}

.personal-data-cont input[type="checkbox"]:checked + .personal-data-check {
    background: #667eea;
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.personal-data-cont input[type="checkbox"]:checked + .personal-data-check::after {
    content: '✓';
    position: absolute;
    color: white;
    font-size: 16px;
    font-weight: bold;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* ВЫДЕЛЕННЫЕ ССЫЛКИ В POPUP ФОРМЕ */
.personal-data-name {
    font-size: 0.95rem;
    color: #475569;
    line-height: 1.5;
    font-weight: 500;
}

.personal-data-name a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    padding: 2px 4px;
    border-radius: 4px;
    transition: all 0.3s ease;
    background: linear-gradient(120deg, transparent, rgba(102, 126, 234, 0.1), transparent);
    background-size: 200% 100%;
    background-position: -100% 0;
}

.personal-data-name a:hover {
    color: #5a67d8;
    text-decoration: none;
    background-position: 0 0;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

/* Кнопка для popup формы */
.connection__wrap__form__button {
    width: 100%;
    padding: 1rem 2rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.connection__wrap__form__button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.connection__wrap__form__button:active {
    transform: translateY(0);
}

.connection__wrap__form__button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.connection__wrap__form__button:hover::before {
    left: 100%;
}

/* Блок благодарности */
.gratitude {
    text-align: center;
    padding: 3rem 2rem;
}

.gratitude.hidden {
    display: none;
}

.gr-main-text {
    font-size: 2.5rem;
    font-weight: 700;
    color: #10b981;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #10b981, #059669);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gr-sub-text {
    font-size: 1.125rem;
    color: #4b5563;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.gr-spam-text {
    font-size: 0.875rem;
    color: #9ca3af;
    font-style: italic;
}

/* Сообщения формы */
.form-message {
    padding: 10px;
    margin-top: 15px;
    border-radius: 5px;
    text-align: center;
    font-weight: 500;
}

.form-message.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.form-message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Анимации */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.feedback-form,
.connection__wrap__form {
    animation: fadeIn 0.6s ease-out;
}

.gratitude {
    animation: fadeIn 0.6s ease-out;
}

/* Валидация */
.form-field input:invalid:not(:focus):not(:placeholder-shown),
.form-field textarea:invalid:not(:focus):not(:placeholder-shown),
.connection__wrap__form__item__input:invalid:not(:focus):not(:placeholder-shown) {
    border-color: #ef4444;
    background: #fef2f2;
}

.form-field input:valid:not(:focus):not(:placeholder-shown),
.form-field textarea:valid:not(:focus):not(:placeholder-shown),
.connection__wrap__form__item__input:valid:not(:focus):not(:placeholder-shown) {
    border-color: #10b981;
    background: #f0fdf4;
}

/* Адаптивность */
@media (max-width: 768px) {
    .feedback-form-wrapper {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .feedback-popup-content {
        padding: 20px;
        margin: 10px;
    }
    
    .feedback-form-popup {
        margin: 1rem;
        padding: 1.5rem;
        border-radius: 16px;
    }
    
    .feedback-form-title {
        font-size: 1.5rem;
    }
    
    .connection__wrap__title {
        font-size: 1.5rem;
    }
    
    .form-field input,
    .form-field textarea,
    .connection__wrap__form__item__input {
        padding: 0.875rem 1rem;
    }
    
    .submit-button-container button,
    .connection__wrap__form__button {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
    
    .personal-data-cont {
        margin: 1.5rem 0;
        padding: 1rem;
    }
    
    .policy-field {
        margin: 1.5rem 0;
        padding: 1rem;
    }
    
    .feedback-popup-trigger {
        width: 100% !important;
        margin: 5px 0;
    }
    
    .policy-checkbox,
    .personal-data-name {
        font-size: 0.9rem;
    }
}