/* Стили для системы бронирования */

/* Модальное окно бронирования */
.booking-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s ease;
    overflow-y: auto;
    padding: 1rem;
}

.booking-modal.show {
    opacity: 1;
}

.booking-modal-content {
    background: white;
    border-radius: 20px;
    width: 100%;
    max-width: 800px;
    max-height: 95vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s ease;
}

.booking-modal.show .booking-modal-content {
    transform: scale(1) translateY(0);
}

.booking-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 2rem 1rem;
    border-bottom: 2px solid var(--light-gray);
    margin-bottom: 2rem;
}

.booking-modal-header h2 {
    color: var(--primary-dark);
    font-size: 1.5rem;
    margin: 0;
}

.booking-modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-gray);
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.booking-modal-close:hover {
    background: var(--light-gray);
    color: var(--primary-dark);
}

.booking-content {
    padding: 0 2rem 2rem;
}

/* Информация о номере */
.booking-room-info {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.05), rgba(212, 175, 55, 0.1));
    border-radius: 15px;
    border: 2px solid var(--gold);
}

.booking-room-image img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 10px;
}

.booking-room-details h3 {
    margin: 0 0 1rem 0;
    color: var(--primary-dark);
    font-size: 1.25rem;
}

.booking-room-details p {
    margin: 0 0 1rem 0;
    color: var(--text-gray);
    font-size: 14px;
    line-height: 1.5;
}

.booking-room-amenities {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.amenity-tag {
    background: var(--gold);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
}

.booking-room-price {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.price-label {
    color: var(--text-gray);
    font-size: 14px;
}

.price-value {
    color: var(--gold);
    font-size: 1.5rem;
    font-weight: bold;
}

/* Форма бронирования */
.booking-form {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.booking-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.booking-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.booking-form-group label {
    font-weight: 600;
    color: var(--primary-dark);
    font-size: 14px;
}

.booking-form-group input,
.booking-form-group select,
.booking-form-group textarea {
    padding: 0.75rem 1rem;
    border: 2px solid var(--light-gray);
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
}

.booking-form-group input:focus,
.booking-form-group select:focus,
.booking-form-group textarea:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.booking-form-group input:read-only {
    background: var(--light-gray);
    color: var(--text-gray);
}

/* Информация о госте */
.booking-guest-info {
    padding: 1.5rem;
    background: rgba(212, 175, 55, 0.05);
    border-radius: 15px;
    border: 1px solid var(--gold);
}

.booking-guest-info h4 {
    margin: 0 0 1rem 0;
    color: var(--primary-dark);
    font-size: 1.1rem;
}

/* Дополнительные услуги */
.booking-additional {
    padding: 1.5rem;
    background: rgba(245, 245, 245, 0.5);
    border-radius: 15px;
    border: 1px solid var(--light-gray);
}

.booking-additional h4 {
    margin: 0 0 1rem 0;
    color: var(--primary-dark);
    font-size: 1.1rem;
}

.booking-services {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.service-checkbox {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.75rem;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.service-checkbox:hover {
    background: rgba(212, 175, 55, 0.1);
}

.service-checkbox input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid var(--light-gray);
    border-radius: 4px;
    position: relative;
    transition: all 0.3s ease;
}

.service-checkbox input[type="checkbox"]:checked+.checkbox-custom {
    background: var(--gold);
    border-color: var(--gold);
}

.service-checkbox input[type="checkbox"]:checked+.checkbox-custom::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 6px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Итоги бронирования */
.booking-summary {
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--gold-light), rgba(212, 175, 55, 0.1));
    border-radius: 15px;
    border: 2px solid var(--gold);
}

.booking-summary h4 {
    margin: 0 0 1rem 0;
    color: var(--primary-dark);
    font-size: 1.2rem;
}

.booking-summary-details {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.summary-row.total {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--primary-dark);
    padding-top: 0.75rem;
    border-top: 2px solid var(--gold);
    margin-top: 0.5rem;
}

/* Заметки */
.booking-notes {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.booking-notes label {
    font-weight: 600;
    color: var(--primary-dark);
    font-size: 14px;
}

.booking-notes textarea {
    resize: vertical;
    min-height: 80px;
}

/* Действия */
.booking-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.booking-btn-primary {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 50px;
    flex: 1;
}

.booking-btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--gold-dark), var(--gold));
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(212, 175, 55, 0.3);
}

.booking-btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.booking-btn-secondary {
    background: transparent;
    color: var(--text-gray);
    border: 2px solid var(--light-gray);
    padding: 1rem 2rem;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 50px;
}

.booking-btn-secondary:hover {
    background: var(--light-gray);
    color: var(--primary-dark);
}

/* Кнопки бронирования на карточках номеров */
.room-book-btn {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 1rem;
}

.room-book-btn:hover {
    background: linear-gradient(135deg, var(--gold-dark), var(--gold));
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(212, 175, 55, 0.4);
}

/* Анимации загрузки */
.btn-loader {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Адаптивность */
@media (max-width: 768px) {
    .booking-modal-content {
        margin: 0;
        width: 100%;
        max-width: none;
        border-radius: 0;
        min-height: 100vh;
        max-height: 100vh;
        overflow-y: auto;
    }

    .booking-modal-header,
    .booking-content {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .booking-room-info {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .booking-room-image img {
        height: 200px;
        width: 100%;
        object-fit: cover;
    }

    .booking-form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .booking-form-row input,
    .booking-form-row select {
        font-size: 16px;
        /* iOS zoom prevention */
        min-height: 48px;
        padding: 0.875rem 1rem;
    }

    .booking-actions {
        flex-direction: column;
        gap: 1rem;
    }

    .booking-actions button {
        width: 100%;
        min-height: 48px;
    }

    .booking-services {
        gap: 0.75rem;
    }

    .service-checkbox {
        padding: 0.5rem;
        min-height: 44px;
    }
}

@media (max-width: 480px) {
    .booking-modal-header {
        padding: 1rem;
        position: sticky;
        top: 0;
        background: white;
        z-index: 10;
    }

    .booking-content {
        padding: 0 1rem 1rem;
    }

    .booking-summary h4,
    .booking-additional h4,
    .booking-guest-info h4 {
        font-size: 1rem;
    }

    .booking-room-details h3 {
        font-size: 1.1rem;
    }

    .price-value {
        font-size: 1.25rem;
    }

    .summary-row.total {
        font-size: 1.1rem;
    }

    .booking-btn-primary,
    .booking-btn-secondary {
        padding: 1rem 1.5rem;
        font-size: 1rem;
        min-height: 52px;
        width: 100%;
    }

    .booking-form-row input,
    .booking-form-row select,
    .booking-form-row textarea {
        font-size: 16px;
        min-height: 50px;
        padding: 1rem;
    }

    /* Quick booking widget на мобиле */
    .quick-booking-widget {
        padding: 1.5rem 1rem;
    }

    .quick-booking-form {
        flex-direction: column;
        gap: 1rem;
    }

    .quick-booking-form input,
    .quick-booking-form select {
        width: 100%;
        min-height: 48px;
    }

    /* Fullscreen animation */
    .booking-modal.show .booking-modal-content {
        animation: slideUpBooking 0.3s ease-out;
    }

    @keyframes slideUpBooking {
        from {
            transform: translateY(100%);
        }

        to {
            transform: translateY(0);
        }
    }
}