/* Shopify-inspired Booking Form Styles */
#customBookingForm {
    max-width: 650px;
    margin: 0 auto;
    padding-top: 20px;
    padding-bottom: 40px;
    padding-left: 40px;
    padding-right: 40px;
    background-color: #ffffff;
    border-radius: 12px;
}

/* Form container */
.form-container {
    position: relative; /* Required for absolute positioning of the overlay */
}

.form-header {
    margin-bottom: 30px;
    text-align: center;
}

.form-header h2 {
    text-align: left;
    color: #333;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 10px;
}

.form-header p {
    text-align: left;
    color: #6b7177;
    font-size: 16px;
}

.form-section {
    margin-bottom: 12px;
}

.form-section-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
    padding-bottom: 10px;
    border-bottom: 1px solid #e6e6e6;
}

#customBookingForm label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

#customBookingForm input,
#customBookingForm select {
    width: 100%;
    padding: 15px;
    margin-bottom: 24px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 16px;
    transition: border-color 0.2s, box-shadow 0.2s;
    background-color: #fff;
    color: #333;
}

#customBookingForm input:focus,
#customBookingForm select:focus {
    outline: none;
    border-color: #000000;
}

/* Calendly-style select dropdowns */
.date-time-selector {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.date-selector,
.time-selector {
    flex: 1;
    min-width: 200px;
}

.select-wrapper {
    position: relative;
}

.select-wrapper:after {
    content: "";
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #000000;
    pointer-events: none;
}

#available_date,
#available_slots {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 35px;
    background-color: #f9fafb;
    cursor: pointer;
}

#available_date:hover,
#available_slots:hover {
    background-color: #f5f5f5;
}

/* Payment button */
#payNow {
    background-color: #000000;
    color: white;
    border: none;
    padding: 15px 20px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 600;
    border-radius: 3px;
    width: 100%;
    transition: background-color 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#paymentStatus {
    margin-top: 20px;
    padding: 12px;
    text-align: center;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    transition: opacity 0.3s ease-in-out;
}

.payment-success {
    background-color: #e6f4ea;
    color: #137333;
}

.payment-error {
    background-color: #fce8e6;
    color: #c5221f;
}

.payment-processing {
    background-color: #e8f0fe;
    color: #1a73e8;
}

/* Booking Confirmation Page Styles */
.booking-confirmation {
    max-width: 600px;
    margin: 40px auto;
    padding: 30px;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.booking-confirmation h2 {
    color: #5cb85c;
    margin-bottom: 20px;
}

.booking-details {
    background-color: white;
    padding: 20px;
    margin: 20px 0;
    border-radius: 4px;
    text-align: left;
}

.booking-error {
    max-width: 600px;
    margin: 40px auto;
    padding: 20px;
    background-color: #ffdddd;
    border-left: 5px solid #f44336;
}

/* Loading Spinner Styles */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9); /* Semi-transparent white background */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000; /* Ensure it's on top of the form */
}

.loading-spinner {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

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

.loading-container {
    text-align: center;
    padding: 20px;
}

.loading-text {
    margin-top: 10px;
    font-size: 16px;
    color: #333;
}

/* Responsive design */
@media (max-width: 768px) {
    #customBookingForm {
        padding: 30px 20px;
    }
    
    .date-time-selector {
        flex-direction: column;
        gap: 0;
    }
    
    .form-header h2 {
        font-size: 22px;
    }
}