/**
 * Park Amaira Banani - Booking System Styles
 * Version: 1.0.0
 * Description: Styles for booking widgets, modals, and availability calendar
 */

/* ============================================
   1. Booking Widget
   ============================================ */
.booking-widget {
    background: var(--gray-bg);
    padding: 25px;
    border-radius: var(--border-radius-lg);
    margin-top: 30px;
    box-shadow: var(--shadow-sm);
}

.booking-widget h3 {
    margin-bottom: 20px;
    font-size: 1.3rem;
    border-left: 3px solid var(--primary-color);
    padding-left: 15px;
}

.booking-widget .booking-field {
    margin-bottom: 15px;
}

.booking-widget .booking-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 0.85rem;
}

.booking-widget .booking-field input,
.booking-widget .booking-field select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    font-size: 0.9rem;
    transition: var(--transition);
}

.booking-widget .booking-field input:focus,
.booking-widget .booking-field select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(212,175,55,0.1);
}

/* ============================================
   2. Booking Modal
   ============================================ */
.booking-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.booking-modal-content {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
    box-shadow: var(--shadow-xl);
}

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

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

.booking-modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--gray-bg);
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
}

.booking-modal-header h3 {
    margin-bottom: 0;
    font-size: 1.3rem;
}

.booking-modal-close {
    font-size: 28px;
    cursor: pointer;
    color: var(--gray-dark);
    transition: var(--transition);
    line-height: 1;
}

.booking-modal-close:hover {
    color: var(--primary-color);
}

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

.booking-modal-body p {
    margin-bottom: 15px;
}

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

.modal-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 0.9rem;
}

.modal-form-group input,
.modal-form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    font-size: 0.95rem;
    transition: var(--transition);
}

.modal-form-group input:focus,
.modal-form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(212,175,55,0.1);
}

/* Price Breakdown */
.modal-price-breakdown {
    background: var(--gray-bg);
    padding: 15px;
    border-radius: var(--border-radius-md);
    margin-top: 20px;
}

.price-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.price-row.total {
    font-weight: 700;
    font-size: 1.1rem;
    border-top: 2px solid var(--border-color);
    padding-top: 10px;
    margin-top: 10px;
    color: var(--primary-color);
}

.booking-modal-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    background: var(--gray-bg);
    border-radius: 0 0 var(--border-radius-lg) var(--border-radius-lg);
}

.booking-modal-footer .btn {
    width: 100%;
}

/* ============================================
   3. Availability Calendar
   ============================================ */
.availability-calendar {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.calendar-nav {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--primary-color);
    padding: 5px 10px;
    transition: var(--transition);
}

.calendar-nav:hover {
    color: var(--primary-dark);
}

.calendar-title {
    font-weight: 600;
    font-size: 1.1rem;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 0.85rem;
}

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

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.85rem;
}

.calendar-day:hover:not(.disabled) {
    background: var(--primary-color);
    color: var(--white);
}

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

.calendar-day.disabled {
    color: var(--gray-dark);
    cursor: not-allowed;
    opacity: 0.5;
}

.calendar-day.available {
    background: var(--gray-bg);
}

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

/* ============================================
   4. Booking Summary
   ============================================ */
.booking-summary {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.booking-summary-header {
    background: var(--primary-color);
    color: var(--white);
    padding: 15px 20px;
}

.booking-summary-header h4 {
    margin-bottom: 0;
    color: var(--white);
}

.booking-summary-body {
    padding: 20px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

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

.summary-label {
    font-weight: 500;
}

.summary-value {
    color: var(--text-dark);
}

.summary-total {
    background: var(--gray-bg);
    padding: 15px;
    border-radius: var(--border-radius-md);
    margin-top: 15px;
}

.summary-total .summary-label,
.summary-total .summary-value {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary-color);
}

/* ============================================
   5. Booking Confirmation
   ============================================ */
.booking-confirmation {
    text-align: center;
    padding: 40px;
    background: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
}

.booking-confirmation i {
    font-size: 4rem;
    color: #4caf50;
    margin-bottom: 20px;
}

.booking-confirmation h3 {
    margin-bottom: 15px;
}

.booking-confirmation p {
    margin-bottom: 25px;
}

.confirmation-details {
    text-align: left;
    background: var(--gray-bg);
    padding: 20px;
    border-radius: var(--border-radius-md);
    margin: 20px 0;
}

/* ============================================
   6. Booking Form (Contact Page)
   ============================================ */
.booking-form-section {
    background: var(--gray-bg);
}

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

.booking-form {
    background: var(--white);
    padding: 30px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
}

.booking-info {
    background: var(--white);
    padding: 30px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
}

.booking-info h3 {
    margin-bottom: 20px;
}

.info-list {
    list-style: none;
    padding: 0;
}

.info-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    padding: 10px;
    background: var(--gray-bg);
    border-radius: var(--border-radius-md);
}

.info-list li i {
    color: var(--primary-color);
    width: 25px;
}

/* ============================================
   7. Loading States
   ============================================ */
.booking-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.booking-loading:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: -10px;
    margin-top: -10px;
}

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

/* ============================================
   8. Error & Success Messages
   ============================================ */
.booking-error {
    background: #ffebee;
    color: #c62828;
    padding: 12px 15px;
    border-radius: var(--border-radius-md);
    margin-bottom: 20px;
    border-left: 3px solid #c62828;
}

.booking-success {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 12px 15px;
    border-radius: var(--border-radius-md);
    margin-bottom: 20px;
    border-left: 3px solid #2e7d32;
}

/* ============================================
   9. Responsive Booking Styles
   ============================================ */
@media (max-width: 768px) {
    .booking-form-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .booking-widget {
        padding: 20px;
    }
    
    .booking-modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .modal-price-breakdown .price-row {
        font-size: 0.85rem;
    }
    
    .summary-total .summary-label,
    .summary-total .summary-value {
        font-size: 1rem;
    }
    
    .booking-confirmation {
        padding: 30px 20px;
    }
}

@media (max-width: 576px) {
    .booking-widget .booking-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .booking-field {
        width: 100%;
    }
    
    .booking-summary-body {
        padding: 15px;
    }
    
    .info-list li {
        font-size: 0.85rem;
    }
}

/* ============================================
   10. Print Styles for Booking Confirmation
   ============================================ */
@media print {
    .site-header,
    .site-footer,
    .whatsapp-float,
    .back-to-top,
    .booking-modal-footer .btn {
        display: none;
    }
    
    .booking-modal {
        position: static;
        background: none;
        backdrop-filter: none;
    }
    
    .booking-modal-content {
        box-shadow: none;
        padding: 0;
    }
    
    .booking-modal-header {
        background: none;
        padding: 0;
        margin-bottom: 20px;
    }
    
    .booking-modal-body {
        padding: 0;
    }
}