/**
 * Simple Booking Form Styles
 * 
 * Clean, modern styles for the booking form
 */

/* Loading Animation */
.gbe-loading {
    text-align: center;
    padding: 2rem;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #e61e4d;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Guest Selector */
.gbe-guest-select {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 20px;
}

.guest-dropdown-arrow {
    font-size: 12px;
    color: #6b7280;
}

.gbe-guest-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1000;
}

/* Guest Controls */
.guest-minus:hover,
.guest-plus:hover {
    background-color: #f9fafb !important;
    border-color: #6b7280 !important;
}

.guest-minus:disabled,
.guest-plus:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Calendar Buttons */
.booking-calendar-buttons button:hover {
    opacity: 0.8;
}

/* Price Rows */
.price-row {
    padding: 0.5rem 0;
}

.price-row.service-fee-row .price-label {
    color: #6b7280;
}

.price-row.discount-row .price-label {
    color: #059669;
}

.price-row.total-row {
    font-weight: 600;
    border-top: 1px solid #e5e7eb;
    margin-top: 1rem;
    padding-top: 1rem;
}

/* Reserve Button */
.gbe-reserve-button {
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(230, 30, 77, 0.2);
}

.gbe-reserve-button:hover {
    box-shadow: 0 4px 8px rgba(230, 30, 77, 0.3);
    transform: translateY(-1px);
}

.gbe-reserve-button:disabled { 
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Error Messages */
.gbe-errors {
    background: #fee2e2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    color: #dc2626;
    font-size: 0.875rem;
}

/* Coupon Section */
.gbe-coupon-section .gbe-coupon-message.success {
    color: #059669;
}

.gbe-coupon-section .gbe-coupon-message.error {
    color: #dc2626;
}

/* Responsive */
@media (max-width: 768px) {

    /* Prevent zoom on input focus */
    .gbe-date-input,
    input[type="text"],
    input[type="number"] {
        font-size: 16px !important;
        /* iOS won't zoom if font-size is 16px or larger */
    }

    /* Ensure inputs are touchable */
    .gbe-date-input {
        min-height: 30px;
        touch-action: manipulation;
    }

    /* Guest selector touchable area */
    .gbe-guest-select {
        min-height: 30px;
        touch-action: manipulation;
        cursor: pointer;
    }

    /* Guest +/- buttons larger for touch */
    .guest-minus,
    .guest-plus {
        min-width: 40px;
        min-height: 40px;
        touch-action: manipulation;
    }

    .guest-dropdown-content {
        margin-left: -16px !important;
        margin-right: -16px !important;
        max-height: 60vh !important;
        overflow-y: auto !important;
    }

    .booking-calendar-buttons {
        bottom: 5px !important;
        right: 5px !important;
    }

    .booking-calendar-buttons button {
        padding: 4px 8px !important;
        font-size: 11px !important;
    }

    /* Mobile popup fixes */
    #booking-popup {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        z-index: 9998 !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }


    /* Mobile calendar close button positioning */
    .mobile-calendar-close {
        position: absolute !important;
        top: 20px !important;
        right: 20px !important;
        /* width: 44px !important;
        height: 44px !important; */
        z-index: 10000 !important;
    }
    

}

/* Animation for pricing updates */
.price-row {
    transition: all 0.3s ease;
}

.gbe-dynamic-pricing {
    transition: all 0.3s ease;
}

/* Focus states */
.gbe-date-input:focus,
.gbe-guest-select:focus {
    outline: 2px solid #e61e4d;
    outline-offset: 2px;
}

/* Accessibility */
.gbe-guest-select[aria-expanded="true"] .guest-dropdown-arrow {
    transform: rotate(180deg);
}



/* Calendar Positioning Fix */


.gbe-date-field {
    position: relative;
}

/* Guest Selector Clean Styling */
.gbe-guest-dropdown .guest-dropdown-content {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    margin-top: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Calendar day price styling */




/* Adjust day cell height to accommodate price */

/* Pricing breakdown toggle animations - prevent bouncing */
.gbe-pricing-details {
    overflow: hidden;
    transition: none !important;
    /* Let jQuery handle the animation */
}

.gbe-toggle-breakdown {
    transition: all 0.2s ease;
    user-select: none;
} 

.gbe-toggle-arrow {
    transition: transform 0.2s ease;
}

.gbe-toggle-arrow.rotate-180 {
    transform: rotate(180deg);
}

/* Prevent any animation conflicts */
.gbe-pricing-section {
    transition: none;
}

.gbe-pricing-section[style*="display: none"] {
    display: none !important;
}

/* Ensure smooth show/hide for pricing elements */
.gbe-toggle-breakdown[style*="display: none"] {
    display: none !important;
}

/* Prevent text selection on toggle button */
.gbe-toggle-breakdown * {
    user-select: none;
}