/* Стили для страницы бронирования */

.main-content {
    padding-top: 100px;
    min-height: 100vh;
}

.booking-header {
    text-align: center;
    margin-bottom: 3rem;
}

.booking-header h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.booking-header p {
    font-size: 1.2rem;
    color: var(--text-light);
}

/* Алерты */
.alert {
    padding: 1rem;
    margin-bottom: 2rem;
    border-radius: var(--border-radius);
    font-weight: 500;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Контент бронирования */
.booking-content {
    display: grid;
    gap: 3rem;
}

/* Выбор домика */
.cabin-selection h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

.cabins-list {
    display: grid;
    gap: 1rem;
}

.cabin-option {
    position: relative;
}

.cabin-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.cabin-option label {
    display: block;
    cursor: pointer;
    transition: var(--transition);
}

.cabin-card-booking {
    background: var(--white);
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    transition: var(--transition);
}

.cabin-option input[type="radio"]:checked + label .cabin-card-booking {
    border-color: var(--accent-color);
    background: #fff8f0;
}

.cabin-card-booking:hover {
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.cabin-card-booking h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.cabin-card-booking p {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.cabin-price {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.cabin-guests {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Календарь */
.calendar-section h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.calendar-legend {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.legend-color.available {
    background-color: #e8f5e8;
}

.legend-color.booked {
    background-color: #ffebee;
}

.legend-color.selected {
    background-color: var(--accent-color);
}

.calendar-container {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--primary-color);
    color: var(--white);
}

.calendar-header h3 {
    margin: 0;
    font-size: 1.3rem;
}

.calendar-nav {
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: var(--transition);
}

.calendar-nav:hover {
    background: rgba(255, 255, 255, 0.1);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.calendar-day-header {
    padding: 1rem 0.5rem;
    text-align: center;
    font-weight: 600;
    background: var(--light-color);
    color: var(--text-color);
    font-size: 0.9rem;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e9ecef;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    font-size: 0.9rem;
}

.calendar-day:hover {
    background: var(--light-color);
}

.calendar-day.other-month {
    color: #ccc;
    background: #f8f9fa;
}

.calendar-day.today {
    background: #e3f2fd;
    font-weight: 600;
}

.calendar-day.booked {
    background: #ffebee;
    color: #c62828;
    cursor: not-allowed;
}

.calendar-day.booked:hover {
    background: #ffebee;
}

.calendar-day.selected {
    background: var(--accent-color);
    color: var(--white);
}

.calendar-day.in-range {
    background: #fff3e0;
    color: var(--accent-color);
}

/* Форма бронирования */
.booking-form-section h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

.booking-form {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(230, 126, 34, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Сводка бронирования */
.booking-summary {
    background: var(--light-color);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin: 1.5rem 0;
}

.booking-summary h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.summary-row.total {
    border-top: 2px solid var(--accent-color);
    padding-top: 0.5rem;
    margin-top: 1rem;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--primary-color);
}

/* Кнопка отправки */
.submit-btn {
    width: 100%;
    background: var(--accent-color);
    color: var(--white);
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    margin-top: 1rem;
}

.submit-btn:hover {
    background: #d35400;
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

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

/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #fff;
    margin: 2% auto;
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px 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);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #eee;
    background: linear-gradient(135deg, #e67e22, #f39c12);
    color: white;
    border-radius: 15px 15px 0 0;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.close {
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: opacity 0.3s ease;
}

.close:hover {
    opacity: 0.7;
}

.modal-body {
    padding: 2rem;
}

.form-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #f0f0f0;
}

.form-section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
}

.form-section h3 {
    margin: 0 0 1rem 0;
    color: #2c3e50;
    font-size: 1.2rem;
    font-weight: 600;
}

.form-value {
    font-weight: 600;
    color: #e67e22;
    font-size: 1.1rem;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-top: 0.5rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.95rem;
    color: #555;
    position: relative;
    padding-left: 2rem;
}

.checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkmark {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 18px;
    width: 18px;
    background-color: #fff;
    border: 2px solid #ddd;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.checkbox-label:hover input ~ .checkmark {
    border-color: #e67e22;
}

.checkbox-label input:checked ~ .checkmark {
    background-color: #e67e22;
    border-color: #e67e22;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-label input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-label.agreement {
    font-size: 0.9rem;
    color: #666;
    margin-top: 1rem;
}

.checkbox-label.agreement a {
    color: #e67e22;
    text-decoration: none;
}

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

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #f0f0f0;
}

.btn-primary, .btn-secondary {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.btn-primary {
    background: linear-gradient(135deg, #e67e22, #f39c12);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #d35400, #e67e22);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(230, 126, 34, 0.3);
}

.btn-secondary {
    background-color: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(149, 165, 166, 0.3);
}

/* Стили для страницы заявки на бронирование */
.booking-form-container {
    max-width: 800px;
    margin: 0 auto;
    display: grid;
    gap: 2rem;
}

.booking-details-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--accent-color);
}

.booking-details-card h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.detail-item label {
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 500;
}

.detail-value {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.detail-item.total {
    grid-column: 1 / -1;
    padding-top: 1rem;
    border-top: 2px solid var(--accent-color);
    margin-top: 1rem;
}

.detail-item.total .detail-value {
    color: var(--accent-color);
    font-size: 1.3rem;
}

.booking-request-form {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow);
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #f0f0f0;
}

.form-actions .btn-secondary {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Адаптивность */
@media (max-width: 768px) {
    .main-content {
        padding-top: 80px;
    }
    
    .booking-header h1 {
        font-size: 2rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .calendar-legend {
        gap: 1rem;
    }
    
    .calendar-day {
        font-size: 0.8rem;
    }
    
    .booking-form {
        padding: 1.5rem;
    }
    
    .details-grid {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .booking-request-form {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .booking-header h1 {
        font-size: 1.8rem;
    }
    
    .calendar-day-header,
    .calendar-day {
        padding: 0.5rem 0.25rem;
        font-size: 0.75rem;
    }
    
    .calendar-header h3 {
        font-size: 1.1rem;
    }
}
