/**
 * Стили для формы бронирования и партнерской системы
 */

/* ========================================
   МОДАЛЬНОЕ ОКНО
   ======================================== */

.booking-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    align-items: center;
    justify-content: center;
}

.booking-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.booking-modal-content {
    position: relative;
    background: white;
    border-radius: 12px;
    padding: 30px;
    max-width: 600px;
    width: 85%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

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

.booking-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 32px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 40px;
    height: 40px;
    transition: color 0.2s;
}

.booking-modal-close:hover {
    color: #333;
}

.booking-modal h2 {
    margin: 0 0 10px 0;
    color: #0073aa;
    font-size: 24px;
}

.modal-subtitle {
    color: #666;
    margin: 0 0 25px 0;
    font-size: 14px;
}

/* ========================================
   ФОРМА БРОНИРОВАНИЯ
   ======================================== */

.booking-form {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* Группировка полей */
.form-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #e9ecef;
}

.section-title {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 600;
    color: #495057;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 0px;
}

.form-group-half {
    flex: 1;
}

.form-group-half .form-group {
    margin-bottom: 0;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

/* Визуальное выделение обязательных полей - стилизация звездочки в label */
.form-group:has(input[required]) label,
.form-group:has(select[required]) label {
    position: relative;
}

.form-group:has(input[required]) label::after,
.form-group:has(select[required]) label::after {
    content: ' *';
    color: #e74c3c;
    font-weight: bold;
    margin-left: 2px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

/* Визуальное выделение обязательных полей - левая граница */
.form-group input[required],
.form-group select[required] {
    border-left: 3px solid #0073aa;
    padding-left: 12px;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #0073aa;
}

/* ========================================
   ИНФОРМАЦИЯ О БРОНИРОВАНИИ
   ======================================== */

.booking-summary {
    background: white;
    border: 1px solid #ddd;
    color: #333;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 16px;
}

.summary-row:last-child {
    margin-bottom: 0;
}

.summary-price {
    font-size: 24px;
    font-weight: bold;
}

.affiliate-info {
    margin-top: 5px;
    padding-top: 5px;
    font-size: 13px;
}

.affiliate-info .summary-row {
    font-size: 13px;
}

.promo-badge {
    background: #28a745;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

/* ========================================
   КНОПКИ
   ======================================== */

.booking-buttons {
    display: flex;
    gap: 15px;
    margin-top: 5px;
}

.booking-submit-btn {
    flex: 1;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
    border: none;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.booking-submit-btn.telegram-btn {
    background: linear-gradient(135deg, #0088cc 0%, #006699 100%);
}

.booking-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.4);
}

.booking-submit-btn.telegram-btn:hover {
    box-shadow: 0 5px 15px rgba(0, 136, 204, 0.4);
}

.booking-submit-btn:active {
    transform: translateY(0);
}

.booking-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ========================================
   ВАЛИДАЦИЯ ФОРМЫ
   ======================================== */

.form-group.error input,
.form-group.error select {
    border-color: #e74c3c;
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.2);
}

.field-error {
    color: #e74c3c;
    font-size: 12px;
    margin-top: 5px;
    display: block;
}

.btn-icon {
    font-size: 20px;
}

.booking-btn,
.quick-booking-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.booking-btn:hover,
.quick-booking-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* ========================================
   ПРИМЕЧАНИЕ
   ======================================== */

.form-note {
    text-align: center;
    font-size: 13px;
    color: #666;
    margin-top: 15px;
    line-height: 1.5;
}

/* ========================================
   АДАПТИВ
   ======================================== */

@media (max-width: 768px) {
    .booking-modal-content {
        width: 85%;
        padding: 20px;
        max-height: 85vh;
        margin: 20px auto;
    }
    
    .booking-modal h2 {
        font-size: 24px;
        margin-top: 10px;
    }
    
    .booking-modal-close {
        top: 15px;
        right: 15px;
        font-size: 32px;
    }
    
    .form-row {
        flex-direction: row;
        gap: 15px;
    }
    
.form-group-half:first-child {
    flex: 1;
}

.form-group-half:last-child {
    flex: 0.3;
    min-width: 120px;
}
    
    .form-section {
        padding: 15px;
    }
    
    .section-title {
        font-size: 15px;
    }
    
    .booking-buttons {
        flex-direction: row;
        gap: 15px;
    }
    
    .booking-submit-btn {
        flex: 1;
        padding: 12px;
        font-size: 16px;
    }
    
    .form-group input,
    .form-group select {
        font-size: 16px; /* Предотвращает зум на iOS */
    }
}

/* ========================================
   АНИМАЦИЯ ЗАГРУЗКИ
   ======================================== */

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.booking-submit-btn:disabled .btn-text {
    animation: pulse 1.5s infinite;
}





