/* contact.css - стили формы связи (с поддержкой ФЗ-152) */

.contact {
    background: transparent;
}

.contact-container {
    max-width: 700px;
    margin: 0 auto;
}

.contact-header {
    text-align: center;
    margin-bottom: 2rem;
}

.contact-header h2 {
    font-size: clamp(2rem, 4vw, 2.5rem);
    margin-bottom: 1rem;
    color: #0f172a;
}

.contact-header p {
    color: #475569;
    margin-bottom: 0.5rem;
}

.contact-header b {
    display: inline-block;
    margin-top: 0.5rem;
    color: #2563eb;
    font-size: 1.1rem;
}

.contact-form {
    background: white;
    padding: 2.5rem;
    border-radius: 32px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #0f172a;
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 20px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    background: #fefefe;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group textarea {
    height: 130px;
    resize: vertical;
}

/* Блок согласия по ФЗ-152 */
.consent-group {
    margin: 1.5rem 0;
    padding: 1rem 1.25rem;
    background: #f8fafc;
    border-radius: 20px;
    border-left: 3px solid #3b82f6;
    transition: all 0.2s ease;
}

.consent-group.error {
    border-left-color: #ef4444;
    background: #fef2f2;
}

.consent-group.error .consent-text {
    color: #dc2626;
}

.consent-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1.4;
}

.consent-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: #2563eb;
    cursor: pointer;
}

.consent-text {
    color: #1e293b;
    user-select: none;
}

.consent-text a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
}

.consent-text a:hover {
    text-decoration: underline;
}

.consent-hint {
    margin-top: 0.5rem;
    margin-left: 1.9rem;
    font-size: 0.7rem;
    color: #64748b;
    line-height: 1.3;
}

/* Кнопка отправки */
.contact-form .btn {
    width: 100%;
    margin-top: 0.5rem;
    padding: 1rem;
    font-size: 1rem;
}

/* Сообщения об ошибках/успехе */
.form-message {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 16px;
    display: none;
    font-size: 0.9rem;
    text-align: center;
}

.form-message.success {
    background: #dcfce7;
    color: #166534;
    display: block;
    border: 1px solid #bbf7d0;
}

.form-message.error {
    background: #fee2e2;
    color: #991b1b;
    display: block;
    border: 1px solid #fecaca;
}

/* Анимация загрузки */
.btn-loading {
    position: relative;
}

.btn-loading .btn-text {
    visibility: hidden;
}

.btn-loading .loading-spinner {
    display: block;
}

.loading-spinner {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid white;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Адаптивность для формы */
@media (max-width: 768px) {
    .contact-form {
        padding: 1.5rem;
    }
    
    .consent-group {
        padding: 0.875rem;
    }
    
    .consent-hint {
        margin-left: 1.5rem;
        font-size: 0.65rem;
    }
}