/* Основные стили для формы заказа */
.order-form-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.order-form-wrapper {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.order-form-wrapper::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(-45deg);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(-45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(-45deg); }
}

.form-title {
    color: white;
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 2rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 2;
}

/* Сетка формы - 3 колонки на десктопе */
.form-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    position: relative;
    z-index: 2;
}

/* Группа полей */
.form-group {
    display: flex;
    flex-direction: column;
}

.form-submit {
    grid-column: 1 / -1;
    justify-self: center;
    width: 100%;
    max-width: 300px;
}

/* Лейблы */
.form-label {
    color: white;
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 8px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Поля ввода */
.form-input {
    padding: 15px 20px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    font-family: inherit;
}

.form-input:focus {
    outline: none;
    background: white;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

/* Специальные стили для поля телефона */
.form-input[type="tel"] {
    font-family: 'Courier New', monospace;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.form-input[type="tel"]:focus {
    color: #2c3e50;
}

.form-input[type="tel"]::placeholder {
    color: #95a5a6;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    letter-spacing: normal;
    font-weight: normal;
}

/* Состояния валидации для телефона */
.form-input[type="tel"].valid {
    border: 2px solid #27ae60 !important;
    background: rgba(39, 174, 96, 0.1) !important;
    color: #27ae60 !important;
}

.form-input[type="tel"].error {
    border: 2px solid #e74c3c !important;
    background: rgba(231, 76, 60, 0.1) !important;
    color: #e74c3c !important;
    animation: phoneShake 0.5s ease-in-out;
}

/* Подсказка оператора связи */
.operator-hint {
    font-size: 0.8rem;
    margin-top: 4px;
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    display: none;
    animation: fadeInUp 0.3s ease;
}

/* Подсказка для поля телефона */
.phone-hint {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 4px;
    font-style: italic;
    transition: all 0.3s ease;
}

.form-group:focus-within .phone-hint {
    color: white;
    opacity: 1;
}

/* Состояния валидации для телефона */
.form-input[type="tel"].valid {
    border: 2px solid #27ae60 !important;
    background: rgba(39, 174, 96, 0.1) !important;
    color: #27ae60 !important;
}

.form-input[type="tel"].error {
    border: 2px solid #e74c3c !important;
    background: rgba(231, 76, 60, 0.1) !important;
    color: #e74c3c !important;
    animation: phoneShake 0.5s ease-in-out;
}

@keyframes phoneShake {
    0%, 20%, 50%, 80%, 100% { transform: translateX(0) translateY(-2px); }
    10%, 30%, 70%, 90% { transform: translateX(-3px) translateY(-2px); }
    40%, 60% { transform: translateX(3px) translateY(-2px); }
}

/* Радио кнопки */
.radio-group, .checkbox-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.radio-option, .checkbox-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    color: white;
    font-weight: 500;
    transition: all 0.3s ease;
}

.radio-option:hover, .checkbox-option:hover {
    transform: scale(1.05);
}

/* Кастомные радио и чекбоксы */
.radio-custom, .checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    margin-right: 8px;
    position: relative;
    transition: all 0.3s ease;
    background: transparent;
}

.checkbox-custom {
    border-radius: 4px;
}

.radio-option input[type="radio"],
.checkbox-option input[type="checkbox"] {
    display: none;
}

.radio-option input[type="radio"]:checked + .radio-custom,
.checkbox-option input[type="checkbox"]:checked + .checkbox-custom {
    background: white;
    border-color: white;
}

.radio-option input[type="radio"]:checked + .radio-custom::after {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #667eea;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.checkbox-option input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '✓';
    color: #667eea;
    font-weight: bold;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 14px;
}

/* Кнопка отправки */
.submit-btn {
    width: 100%;
    padding: 18px 30px;
    background: linear-gradient(45deg, #ff6b6b, #feca57);
    border: none;
    border-radius: 50px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.3);
}

.submit-btn:active {
    transform: translateY(-1px);
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.submit-btn:hover::before {
    left: 100%;
}

/* Лоадер */
.btn-loader {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    margin-left: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.submit-btn.loading .btn-text {
    opacity: 0.7;
}

.submit-btn.loading .btn-loader {
    display: inline-block;
}

/* Сообщения формы */
.form-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    font-weight: 500;
    display: none;
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.form-message.success {
    background: rgba(39, 174, 96, 0.9);
    color: white;
}

.form-message.error {
    background: rgba(231, 76, 60, 0.9);
    color: white;
}

/* Планшеты */
@media (max-width: 1024px) {
    .form-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .order-form-wrapper {
        padding: 30px;
    }
    
    .form-title {
        font-size: 2.2rem;
    }
}

/* Мобильные устройства - одна колонка */
@media (max-width: 768px) {
    .order-form-container {
        padding: 15px;
    }
    
    .order-form-wrapper {
        padding: 25px 20px;
        border-radius: 15px;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .form-title {
        font-size: 1.8rem;
        margin-bottom: 1.5rem;
    }
    
    .radio-group, .checkbox-group {
        flex-direction: column;
        gap: 10px;
    }
    
    .form-input {
        padding: 12px 15px;
        font-size: 16px; /* Предотвращает зум на iOS */
    }
    
    .submit-btn {
        padding: 15px 25px;
        font-size: 1rem;
    }
}

/* Очень маленькие экраны */
@media (max-width: 480px) {
    .order-form-wrapper {
        padding: 20px 15px;
    }
    
    .form-title {
        font-size: 1.5rem;
    }
    
    .radio-custom, .checkbox-custom {
        width: 18px;
        height: 18px;
    }
    
    .radio-text, .checkbox-text {
        font-size: 0.9rem;
    }
}

/* Улучшенная доступность */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Фокус для клавиатурной навигации */
.form-input:focus,
.radio-option:focus-within,
.checkbox-option:focus-within,
.submit-btn:focus {
    outline: 2px solid rgba(255, 255, 255, 0.8);
    outline-offset: 2px;
}