/**
 * Hall Booking System - Frontend Styles
 * @version 2.0.0
 */

/* ====================================
   Booking Form Container
==================================== */
.hbs-booking-form {
    max-width: 600px;
    margin: 30px auto;
    padding: 30px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.hbs-booking-form h3 {
    margin: 0 0 25px 0;
    font-size: 24px;
    color: #333;
    text-align: center;
    font-weight: 600;
}

/* ====================================
   Form Fields
==================================== */
.hbs-form-group {
    margin-bottom: 25px;
}

.hbs-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
    font-size: 14px;
}

.hbs-form-group input[type="date"],
.hbs-form-group input[type="text"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 16px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.hbs-form-group input[type="date"]:focus,
.hbs-form-group input[type="text"]:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.hbs-date-format-hint {
    display: block;
    margin-top: 5px;
    font-size: 13px;
    color: #666;
    font-style: italic;
}

/* ====================================
   Slot Selection (Multiple Checkboxes)
==================================== */
.hbs-slot-selection {
    display: flex;
    flex-direction: row;
    gap: 12px;
}

.hbs-slot-option {
    position: relative;
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fff;
}

.hbs-slot-option:hover {
    background: #f5f5f5;
    border-color: #bdbdbd;
}

.hbs-slot-option input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 5px;
    cursor: pointer;
    accent-color: #4CAF50;
}

.hbs-slot-option.checked {
    background: #e8f5e9;
    border-color: #4CAF50;
}

.hbs-slot-option.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f5f5f5;
}

.hbs-slot-option.disabled input[type="checkbox"] {
    cursor: not-allowed;
}

.hbs-slot-label {
    flex: 1;
    font-size: 15px;
    color: #333;
    font-weight: 500;
}

.hbs-slot-badge {
    padding: 4px 10px;
    background: #f44336;
    color: white;
    font-size: 11px;
    border-radius: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.hbs-slot-badge.available {
    background: #4CAF50;
}

/* ====================================
   Submit Button
==================================== */
.hbs-submit-btn {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hbs-submit-btn:hover {
    background: linear-gradient(135deg, #45a049 0%, #3d8b40 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.hbs-submit-btn:active {
    transform: translateY(0);
}

.hbs-submit-btn:disabled {
    background: #bdbdbd;
    cursor: not-allowed;
    transform: none;
}

/* ====================================
   Response Messages
==================================== */
.hbs-response-message {
    margin-top: 20px;
    padding: 15px 20px;
    border-radius: 6px;
    font-size: 15px;
    line-height: 1.6;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hbs-response-message.success {
    background: #e8f5e9;
    color: #2e7d32;
    border-left: 4px solid #4CAF50;
}

.hbs-response-message.error {
    background: #ffebee;
    color: #c62828;
    border-left: 4px solid #f44336;
}

.hbs-response-message a {
    display: inline-block;
    margin-top: 10px;
    padding: 10px 20px;
    background: #4CAF50;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: background 0.3s ease;
}

.hbs-response-message a:hover {
    background: #45a049;
}

/* ====================================
   Loading State
==================================== */
.hbs-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.hbs-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #4CAF50;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ====================================
   Booking Calendar
==================================== */
#hbs-calendar-wrapper {
    max-width: 1000px;
    margin: 30px auto;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

#hall-booking-calendar {
    font-family: inherit;
}

/* FullCalendar custom styles */
.fc-event {
    border-radius: 4px;
    padding: 2px 4px;
}

/* ====================================
   Responsive Design
==================================== */
@media screen and (max-width: 600px) {
    .hbs-slot-selection {
        flex-direction: column;
    }
    .hbs-booking-form {
        padding: 20px;
        margin: 20px 15px;
    }
    
    .hbs-booking-form h3 {
        font-size: 20px;
    }
    
    .hbs-slot-option {
        padding: 12px 15px;
    }
    
    .hbs-slot-label {
        font-size: 14px;
    }
    
    .hbs-submit-btn {
        padding: 14px 20px;
        font-size: 15px;
    }
}

/* ====================================
   Add-on Product Widget
==================================== */
.checkout-add-to-cart-widget {
    border: 1px solid #ddd;
    padding: 15px;
    margin-top: 20px;
    background: #f9f9f9;
    border-radius: 5px;
    text-align: center;
}

.checkout-product {
    border: 1px solid #eee;
    padding: 10px;
    background: #fff;
    border-radius: 5px;
    display: inline-block;
}

.checkout-product h4 {
    margin: 0 0 5px 0;
    padding: 0;
    font-size: 16px;
}

.checkout-product p {
    margin: 5px 0;
    padding: 0;
}

.checkout-product .add-to-cart {
    display: inline-block;
    margin-top: 10px;
    background: #0071a1;
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.3s ease;
}

.checkout-product .add-to-cart:hover {
    background: #005c80;
}

/* ====================================
   Print Styles
==================================== */
@media print {
    .hbs-submit-btn,
    .hbs-response-message a {
        display: none;
    }
}