/**
 * Стили формы бронирования
 * 
 * @package Hotel_Booking_System
 */

 .hotel-booking-form-wrapper {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.hotel-booking-form {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
    overflow: hidden;
}

.booking-form-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    padding: 30px;
}

/* === ЛЕВАЯ КОЛОНКА === */
.booking-form-left {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.booking-info-block,
.guests-form-block {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
}

.booking-info-block h3,
.guests-form-block h3 {
    margin: 0 0 20px 0;
    font-size: 18px;
    color: #333;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 10px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px dashed #ddd;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    color: #666;
    font-weight: 500;
}

.info-value {
    font-weight: 600;
    color: #333;
}

.info-total {
    background: #e8f5e9;
    padding: 12px;
    border-radius: 4px;
    margin-top: 10px;
}

.info-total .info-value {
    color: #2e7d32;
    font-size: 18px;
}

.placement-breakdown {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid #e0e0e0;
}

.placement-breakdown h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #666;
}

.placement-breakdown ul {
    margin: 0;
    padding-left: 20px;
    color: #555;
    font-size: 14px;
}

.placement-breakdown li {
    margin: 5px 0;
}

/* Формы гостей */
.form-hint {
    font-size: 13px;
    color: #666;
    margin: -10px 0 20px 0;
    font-style: italic;
}

.guest-form-group {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
}

.guest-form-group h4 {
    margin: 0 0 15px 0;
    font-size: 14px;
    color: #444;
    font-weight: 600;
}

.guest-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 10px;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-field label {
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

.form-field input {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-field input:focus {
    outline: none;
    border-color: #4CAF50;
}

.form-field input:required:invalid {
    border-color: #f44336;
}

/* === ПРАВАЯ КОЛОНКА === */
.booking-form-right {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: 20px;
    height: fit-content;
}

.payment-block,
.consents-block {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
}

.payment-block h3,
.consents-block h3 {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: #333;
}

.payment-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.payment-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.payment-option:hover {
    border-color: #4CAF50;
}

.payment-option input[type="radio"] {
    margin: 0;
}

.consent-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 15px;
    font-size: 13px;
    color: #555;
    line-height: 1.4;
}

.consent-checkbox input {
    margin-top: 3px;
}

.consent-checkbox a {
    color: #4CAF50;
    text-decoration: none;
}

.consent-checkbox a:hover {
    text-decoration: underline;
}

/* Кнопка бронирования */
.btn-book-submit {
    width: 100%;
    padding: 16px 24px;
    background: #4CAF50;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-book-submit:hover {
    background: #45a049;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.btn-book-submit:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* Сообщение */
.booking-message {
    padding: 15px;
    border-radius: 6px;
    font-size: 14px;
    text-align: center;
}

.booking-message.success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #4CAF50;
}

.booking-message.error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #f44336;
}

.booking-back {
    text-align: center;
    margin: 0;
}

.booking-back a {
    color: #666;
    text-decoration: none;
    font-size: 14px;
}

.booking-back a:hover {
    color: #4CAF50;
}

/* === АДАПТИВНОСТЬ === */
@media (max-width: 900px) {
    .booking-form-grid {
        grid-template-columns: 1fr;
    }
    
    .booking-form-right {
        position: static;
    }
    
    .guest-form-row {
        grid-template-columns: 1fr;
    }
}

/* === ОШИБКА: нет данных === */
.booking-error {
    text-align: center;
    padding: 40px;
    background: #ffebee;
    border-radius: 8px;
    color: #c62828;
    font-size: 16px;
}

/* Подсветка ошибок валидации */
.form-field input.invalid {
    border-color: #f44336;
    background: #ffebee;
}

.form-field input.invalid:focus {
    border-color: #c62828;
    box-shadow: 0 0 0 2px rgba(244, 67, 54, 0.2);
}

/* Сообщение об ошибке/успехе */
.booking-message {
    padding: 15px;
    border-radius: 6px;
    font-size: 14px;
    text-align: center;
    margin: 15px 0;
    display: none;
}

.booking-message.success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #4CAF50;
    display: block;
}

.booking-message.error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #f44336;
    display: block;
}

/* Гостевая форма: 3 поля в ряд */
.guest-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;  /* ✅ Было: 1fr 1fr */
    gap: 15px;
    margin-bottom: 10px;
}

/* Адаптивность: на планшетах 2 поля в ряд */
@media (max-width: 900px) {
    .guest-form-row {
        grid-template-columns: 1fr 1fr;
    }
    
    .guest-form-row .form-field:last-child {
        grid-column: 1 / -1;  /* Отчество на всю ширину */
    }
}

/* Адаптивность: на мобильных 1 поле в ряд */
@media (max-width: 600px) {
    .guest-form-row {
        grid-template-columns: 1fr;
    }
}

/* =====================================================
   МОДАЛЬНОЕ ОКНО УСПЕШНОГО БРОНИРОВАНИЯ
   ===================================================== */

   .booking-success-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

.booking-success-modal.show {
    display: flex;
}

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

.booking-success-modal .modal-content {
    position: relative;
    background: #fff;
    border-radius: 16px;
    max-width: 520px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

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

.booking-success-modal .modal-header {
    padding: 24px 24px 16px;
    text-align: center;
    border-bottom: 1px solid #eee;
}

.booking-success-modal .success-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 8px;
}

.booking-success-modal .modal-header h2 {
    margin: 0;
    font-size: 20px;
    color: #2e7d32;
}

.booking-success-modal .modal-body {
    padding: 20px 24px;
}

.booking-success-modal .success-message {
    margin: 0 0 20px 0;
    font-size: 16px;
    color: #555;
    text-align: center;
}

.booking-success-modal .booking-details {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
}

.booking-success-modal .booking-details h3 {
    margin: 0 0 12px 0;
    font-size: 14px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.booking-success-modal .detail-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px dashed #ddd;
    font-size: 14px;
}

.booking-success-modal .detail-row:last-child {
    border-bottom: none;
}

.booking-success-modal .detail-row .label {
    color: #666;
}

.booking-success-modal .detail-row .value {
    font-weight: 600;
    color: #333;
}

.booking-success-modal .detail-row.total {
    padding-top: 12px;
    margin-top: 8px;
    border-top: 2px solid #ddd;
    border-bottom: none;
    font-size: 16px;
}

.booking-success-modal .detail-row.total .value.price {
    color: #2e7d32;
    font-size: 18px;
}

.booking-success-modal .booking-info {
    text-align: center;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

.booking-success-modal .booking-info .booking-id {
    margin: 12px 0 0 0;
    background: #e8f5e9;
    padding: 8px 12px;
    border-radius: 6px;
    color: #2e7d32;
}

.booking-success-modal .modal-footer {
    padding: 16px 24px 24px;
    display: flex;
    gap: 12px;
    justify-content: center;
    border-top: 1px solid #eee;
}

.booking-success-modal .modal-footer .button {
    flex: 1;
    max-width: 200px;
    text-align: center;
    padding: 12px 16px;
    font-size: 14px;
    border-radius: 8px;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.booking-success-modal .modal-footer .button-primary {
    background: #4CAF50;
    color: #fff;
}

.booking-success-modal .modal-footer .button-primary:hover {
    background: #43a047;
}

.booking-success-modal .modal-footer .button-secondary {
    background: #fff;
    color: #c62828;
    border: 2px solid #ef9a9a;
}

.booking-success-modal .modal-footer .button-secondary:hover {
    background: #ffebee;
}

.booking-success-modal .cancel-link {
    display: block;
    text-align: center;
    color: #c62828;
    font-size: 13px;
    margin-top: 8px;
    text-decoration: none;
}

.booking-success-modal .cancel-link:hover {
    text-decoration: underline;
}

/* Адаптив */
@media (max-width: 600px) {
    .booking-success-modal .modal-content {
        max-width: 100%;
        margin: 10px;
    }
    
    .booking-success-modal .modal-footer {
        flex-direction: column;
    }
    
    .booking-success-modal .modal-footer .button {
        max-width: 100%;
    }
}