/**
 * SuiteSync Booking Form - Enhanced CSS Styles
 * Modern, responsive, and accessible booking form design
 **/

/* ==========================================================================
   ENHANCED BOOKING FORM STYLES
   ========================================================================== */

/* ==========================================================================
   FLATPICKR CALENDAR CUSTOMIZATION
   ========================================================================== */

/* Available dates - Green styling */
.flatpickr-calendar .flatpickr-day.available,
.flatpickr-calendar .flatpickr-day:not(.flatpickr-disabled):not(.prevMonthDay):not(.nextMonthDay):not(.booked-day):not(.checkout-only):not(.checkin-only):not(.unavailable) {
    background: linear-gradient(135deg, #27ae60, #2ecc71) !important;
    color: white !important;
    border: none !important;
    font-weight: 600 !important;
    position: relative !important;
    transition: all 0.3s ease !important;
}

.flatpickr-calendar .flatpickr-day.available:hover,
.flatpickr-calendar .flatpickr-day:not(.flatpickr-disabled):not(.prevMonthDay):not(.nextMonthDay):not(.booked-day):not(.checkout-only):not(.checkin-only):not(.unavailable):hover {
    background: linear-gradient(135deg, #229954, #27ae60) !important;
    transform: scale(1.1) !important;
    box-shadow: 0 4px 12px rgba(46, 204, 113, 0.4) !important;
    z-index: 10 !important;
}

.flatpickr-calendar .flatpickr-day.available::after,
.flatpickr-calendar .flatpickr-day:not(.flatpickr-disabled):not(.prevMonthDay):not(.nextMonthDay):not(.unavailable)::after {
    content: '✓';
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 8px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: bold;
}

/* Unavailable dates - Red styling */
.flatpickr-calendar .flatpickr-disabled {
    background: linear-gradient(135deg, #e74c3c, #c0392b) !important;
    color: white !important;
    border: 2px solid #c0392b !important;
    cursor: not-allowed !important;
    position: relative !important;
    opacity: 0.9 !important;
}

.flatpickr-calendar .flatpickr-disabled::after {
    content: '✗';
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 8px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: bold;
}

/* Partial availability dates - Half green/half red */
.flatpickr-calendar .flatpickr-day.partial-date {
    position: relative !important;
    overflow: hidden !important;
    border: 2px solid #34495e !important;
    color: white !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
}

.flatpickr-calendar .flatpickr-day.partial-date .half-available {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    z-index: 2;
}

/* Check-in only dates (guest checking out) - Green left, red right */
.flatpickr-calendar .flatpickr-day.checkin-only {
    background: linear-gradient(90deg, #27ae60 50%, #e74c3c 50%) !important;
}

.flatpickr-calendar .flatpickr-day.checkin-only::before {
    content: '↓';
    position: absolute;
    top: 2px;
    left: 2px;
    font-size: 8px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: bold;
    z-index: 3;
}

.flatpickr-calendar .flatpickr-day.checkin-only::after {
    content: '↑';
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 8px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: bold;
    z-index: 3;
}

/* Check-out only dates (guest checking in) - Red left, green right */
.flatpickr-calendar .flatpickr-day.checkout-only {
    background: linear-gradient(90deg, #e74c3c 50%, #27ae60 50%) !important;
}

.flatpickr-calendar .flatpickr-day.checkout-only::before {
    content: '↑';
    position: absolute;
    top: 2px;
    left: 2px;
    font-size: 8px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: bold;
    z-index: 3;
}

.flatpickr-calendar .flatpickr-day.checkout-only::after {
    content: '↓';
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 8px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: bold;
    z-index: 3;
}

/* Hover effects for partial dates */
.flatpickr-calendar .flatpickr-day.partial-date:hover {
    transform: scale(1.05) !important;
    box-shadow: 0 4px 12px rgba(52, 73, 94, 0.4) !important;
    z-index: 10 !important;
    border-color: #2c3e50 !important;
}

.flatpickr-calendar .flatpickr-disabled::after {
    content: '✕';
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 8px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: bold;
}

.flatpickr-calendar .flatpickr-disabled:hover {
    background: linear-gradient(135deg, #c0392b, #a93226) !important;
    transform: none !important;
}

/* Selected date styling */
.flatpickr-calendar .flatpickr-day.selected {
    background: linear-gradient(135deg, #3498db, #2980b9) !important;
    border: 2px solid #2980b9 !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4) !important;
    transform: scale(1.1) !important;
    z-index: 15 !important;
}

.flatpickr-calendar .flatpickr-day.selected::after {
    content: '★';
    color: #f1c40f;
}

/* Range selection styling */
.flatpickr-calendar .flatpickr-day.inRange {
    background: linear-gradient(135deg, #f39c12, #d68910) !important;
    color: white !important;
    border: 2px solid #d68910 !important;
}

.flatpickr-calendar .flatpickr-day.startRange,
.flatpickr-calendar .flatpickr-day.endRange {
    background: linear-gradient(135deg, #9b59b6, #8e44ad) !important;
    border: 2px solid #8e44ad !important;
    color: white !important;
}

/* Today's date special styling */
.flatpickr-calendar .flatpickr-day.today:not(.flatpickr-disabled) {
    border: 3px solid #f1c40f !important;
    box-shadow: 0 0 8px rgba(241, 196, 15, 0.6) !important;
}

.flatpickr-calendar .flatpickr-day.today::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border: 1px solid #f1c40f;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

/* Calendar header styling */
.flatpickr-calendar .flatpickr-months {
    background: transparent !important;
    color: #2d3748 !important;
}

.flatpickr-calendar .flatpickr-month {
    color: #2d3748 !important;
}

.flatpickr-calendar .flatpickr-prev-month,
.flatpickr-calendar .flatpickr-next-month {
    color: white !important;
}

.flatpickr-calendar .flatpickr-prev-month:hover,
.flatpickr-calendar .flatpickr-next-month:hover {
    color: #3498db !important;
}

/* Weekday headers */
.flatpickr-calendar .flatpickr-weekday {
    background: #ecf0f1 !important;
    color: #2c3e50 !important;
    font-weight: 600 !important;
    font-size: 12px !important;
}

/* Calendar container enhancements */
.flatpickr-calendar {
    border: none !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15) !important;
    overflow: hidden !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

/* Calendar wrapper with custom styling */
.suitesync-calendar {
    animation: slideIn 0.3s ease-out !important;
}

@keyframes slideIn {
    from { 
        opacity: 0; 
        transform: translateY(-10px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

/* Custom day styling for better UX */
.flatpickr-calendar .available-date {
    position: relative !important;
    overflow: hidden !important;
}

.flatpickr-calendar .available-date::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.6s;
}

.flatpickr-calendar .available-date:hover::before {
    left: 100%;
}

/* Unavailable date enhancement */
.flatpickr-calendar .unavailable-date {
    position: relative !important;
    overflow: hidden !important;
}

.flatpickr-calendar .unavailable-date::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 10%;
    right: 10%;
    height: 2px;
    background: rgba(255, 255, 255, 0.8);
    transform: translateY(-50%) rotate(-45deg);
}

/* Legend for calendar */
.calendar-legend {
    display: flex !important;
    justify-content: space-around !important;
    margin: 10px 0 !important;
    padding: 8px !important;
    background: #f8f9fa !important;
    border-radius: 8px !important;
    font-size: 12px !important;
}

.legend-item {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
}

.legend-dot {
    width: 12px !important;
    height: 12px !important;
    border-radius: 50% !important;
    display: inline-block !important;
}

.legend-available { background: linear-gradient(135deg, #27ae60, #2ecc71) !important; }
.legend-unavailable { background: linear-gradient(135deg, #e74c3c, #c0392b) !important; }
.legend-checkin-only { background: linear-gradient(90deg, #27ae60 50%, #e74c3c 50%) !important; }
.legend-checkout-only { background: linear-gradient(90deg, #e74c3c 50%, #27ae60 50%) !important; }

/* Mobile responsiveness for calendar */
@media (max-width: 768px) {
    .flatpickr-calendar {
        width: 100% !important;
        max-width: 320px !important;
    }
    
    .flatpickr-calendar .flatpickr-day {
        height: 35px !important;
        line-height: 35px !important;
        width: 35px !important;
    }
    
    .calendar-legend {
        flex-direction: column !important;
        gap: 8px !important;
    }
    
    .legend-item {
        justify-content: center !important;
    }
}

/* Enhanced date input styling */
.flatpickr-date {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef) !important;
    border: 2px solid #dee2e6 !important;
    border-radius: 8px !important;
    padding: 12px 16px !important;
    font-size: 14px !important;
    transition: all 0.3s ease !important;
    cursor: pointer !important;
}

.flatpickr-date:focus {
    border-color: #3498db !important;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2) !important;
    background: white !important;
}

.flatpickr-date:hover {
    border-color: #3498db !important;
    background: white !important;
}

/* Loading animation for calendar */
.calendar-loading {
    position: relative;
    opacity: 0.7;
}

.calendar-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #3498db;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Main Booking Form Container */
.suitesync-booking-form {
    background: #ffffff !important;
    border: 1px solid #e1e5e9 !important;
    border-radius: 12px !important;
    padding: 24px !important;
    margin: 20px 0 !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    max-width: 100% !important;
    position: relative !important;
}

.suitesync-booking-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3498db, #2ecc71, #f39c12, #e74c3c);
    border-radius: 12px 12px 0 0;
}

.suitesync-booking-form h3 {
    color: #2c3e50 !important;
    font-size: 20px !important;
    font-weight: 600 !important;
    margin-bottom: 20px !important;
    text-align: center !important;
    border-bottom: 2px solid #3498db !important;
    padding-bottom: 10px !important;
    margin-top: 8px !important;
}

.suitesync-form-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 16px !important;
    margin-bottom: 16px !important;
}

.suitesync-form-field {
    display: flex !important;
    flex-direction: column !important;
}

.suitesync-form-field label {
    font-weight: 600 !important;
    color: #34495e !important;
    margin-bottom: 6px !important;
    font-size: 14px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

.suitesync-form-field input,
.suitesync-form-field select,
.suitesync-form-field textarea {
    padding: 12px !important;
    border: 2px solid #e9ecef !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    transition: all 0.3s ease !important;
    width: 100% !important;
    box-sizing: border-box !important;
    background: #f8f9fa !important;
}

.suitesync-form-field input:focus,
.suitesync-form-field select:focus,
.suitesync-form-field textarea:focus {
    outline: none !important;
    border-color: #3498db !important;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1) !important;
    background: #ffffff !important;
    transform: translateY(-1px) !important;
}

.suitesync-form-field input:hover,
.suitesync-form-field select:hover,
.suitesync-form-field textarea:hover {
    border-color: #bdc3c7 !important;
    background: #ffffff !important;
}

.suitesync-submit-btn {
    background: linear-gradient(135deg, #3498db, #2980b9) !important;
    color: white !important;
    border: none !important;
    padding: 16px 32px !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    width: 100% !important;
    transition: all 0.3s ease !important;
    margin-top: 10px !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    position: relative !important;
    overflow: hidden !important;
}

.suitesync-submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.suitesync-submit-btn:hover::before {
    left: 100%;
}

.suitesync-submit-btn:hover {
    background: linear-gradient(135deg, #2980b9, #1f5f8b) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4) !important;
}

.suitesync-submit-btn:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3) !important;
}

.suitesync-submit-btn:disabled {
    opacity: 0.7 !important;
    cursor: not-allowed !important;
    transform: none !important;
}

.suitesync-message {
    margin-top: 16px !important;
    padding: 12px 16px !important;
    border-radius: 8px !important;
    font-weight: 500 !important;
    border-left: 4px solid transparent !important;
    animation: slideInFromTop 0.3s ease !important;
}

.suitesync-message.success {
    background: #d4edda !important;
    border: 1px solid #c3e6cb !important;
    border-left-color: #28a745 !important;
    color: #155724 !important;
}

.suitesync-message.error {
    background: #f8d7da !important;
    border: 1px solid #f5c6cb !important;
    border-left-color: #dc3545 !important;
    color: #721c24 !important;
}

/* Loading state */
.suitesync-submit-btn.loading {
    background: #95a5a6 !important;
    cursor: wait !important;
}

.suitesync-submit-btn.loading::after {
    content: '';
    width: 16px;
    height: 16px;
    margin-left: 8px;
    border: 2px solid #ffffff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    display: inline-block;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes slideInFromTop {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .suitesync-form-grid {
        grid-template-columns: 1fr !important;
    }
    
    .suitesync-booking-form {
        padding: 16px !important;
        margin: 10px 0 !important;
    }
    
    .suitesync-booking-form h3 {
        font-size: 18px !important;
    }
    
    .suitesync-submit-btn {
        padding: 14px 24px !important;
        font-size: 14px !important;
    }
}

/* Sidebar specific styles */
.sidebar .suitesync-booking-form {
    margin: 0 !important;
    border-radius: 10px !important;
}

.booking-form-sidebar .suitesync-booking-form h3 {
    font-size: 18px !important;
    margin-bottom: 16px !important;
}

/* Auto-injected form styles */
.suitesync-auto-injected-form {
    border-top: 3px solid #3498db !important;
    padding-top: 30px !important;
    margin-top: 40px !important;
}

.suitesync-auto-injected-form::before {
    content: '📋 Make a Reservation';
    display: block;
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
    text-align: center;
}

/* Integration with theme styles */
.single-accommodation .suitesync-booking-form {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
    border: 1px solid #e1e5e9 !important;
}

/* Old form backwards compatibility */
#suitesync-booking-form {
    background: transparent !important;
}



/* Sidebar Background */
.booking-form-sidebar {
    background: url(../images/bg-white-leather.png) repeat !important;
}

/* ==========================================================================
   LAYOUT COMPONENTS
   ========================================================================== */

/* Row Layouts */
.suitesync-booking-ui .ss-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
    align-items: flex-start;
    width: 100%;
}

.suitesync-booking-ui .ss-row-compact {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    margin-bottom: 10px;
    width: 100%;
    align-items: end;
}

/* Two-column layout when infant field is hidden */
.suitesync-booking-ui .ss-row-compact.ss-row-compact-two-cols {
    grid-template-columns: 1fr 1fr;
}

/* Column Layouts */
.suitesync-booking-ui .ss-col {
    flex: 1 1 150px;
    min-width: 120px;
}

.suitesync-booking-ui .ss-col-compact {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0; /* Allow shrinking */
    align-items: stretch;
    justify-content: flex-start;
}

/* ==========================================================================
   FORM ELEMENTS - LABELS
   ========================================================================== */

.suitesync-booking-ui label {
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    display: inline-block;
}

/* Override for theme compatibility */
.suitesync-booking-ui label {
    font-weight: 600;
    color: #3b3b3b !important;
    height: auto;
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    line-height: 1.2;
}

.capacity-hint {
    font-size: 10px;
    color: #666;
    margin: 0 0 6px 0;
    font-weight: 500;
    text-align: left;
    height: 18px;
    display: flex;
    align-items: center;
    line-height: 1;
}

/* Target specifically the adults capacity hint to remove gap */
.ss-col-compact:first-child .capacity-hint {
    margin: 0;
}

/* Target specifically the adults label to remove margin */
.suitesync-booking-ui .adults-label {
    margin-bottom: 0 !important;
}

/* ==========================================================================
   FORM ELEMENTS - INPUT FIELDS
   ========================================================================== */

/* Placeholder Styling */
.suitesync-booking-ui input[type="text"]::placeholder,
.suitesync-booking-ui input[type="email"]::placeholder,
.suitesync-booking-ui input[type="tel"]::placeholder {
    color: #4a4b38;
}

/* Focus States */
.suitesync-booking-ui input:focus {
    border-color: #bfa76a;
    outline: none;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0 3px rgba(191, 167, 106, 0.1);
    color: #fff;
}

/* Generic Form Elements */
.suitesync-booking-form label { 
    display: block; 
    margin-bottom: 10px; 
}



/* ==========================================================================
   GUEST INPUT FIELDS WITH INCREMENT/DECREMENT BUTTONS
   ========================================================================== */

.booking-guest-input-wrapper {
    display: flex;
    align-items: center;
    position: relative;
    border-radius: 0px;
    overflow: hidden;
    margin-top: 0;
    width: 100%;
    box-sizing: border-box;
    height: 52px;
    min-height: 52px;
}

.booking-guest-input-wrapper input[type="number"] {
    flex: 1;
    border-radius: 0 !important;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: #6e7149 !important;
    padding: 12px 10px;
    height: 52px;
    min-height: 52px;
    box-sizing: border-box;
    -moz-appearance: textfield;
    appearance: textfield;
    width: auto;
    border: none;
    background: transparent;
}

/* Hide spinner arrows in WebKit browsers */
.booking-guest-input-wrapper input[type="number"]::-webkit-outer-spin-button,
.booking-guest-input-wrapper input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.booking-guest-input-wrapper input[type="number"]:focus {
    outline: none;
    box-shadow: none;
    border-color: transparent;
    background: transparent !important;
}

.booking-guest-input-wrapper:focus-within {
    border-color: #bfa76a;
    box-shadow: 0 0 0 3px rgba(191, 167, 106, 0.1);
}

.booking-guest-decrement,
.booking-guest-increment {
    background: #ab896e;
    color: #ffffff;
    border: none;
    width: 40px;
    height: 100%;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.booking-guest-decrement{
    border-radius:5px 0 0 5px;
}
.booking-guest-increment {
    border-radius:0 5px 5px 0;
}
.booking-guest-increment:hover {
    background: #bfa76a;
    transform: scale(1.05);
}

.booking-guest-decrement:active,
.booking-guest-increment:active {
    transform: scale(0.95);
}

/* ==========================================================================
   CALENDAR AND DATE COMPONENTS
   ========================================================================== */

.suitesync-booking-ui .ss-calendar-wrap {
    margin: 12px 0 10px 0;
    background: #f8f6f2;
    border-radius: 0px;
    padding: 12px;
    box-shadow: 0 1px 3px rgba(191,167,106,0.05);
    width: 100%;
    box-sizing: border-box;
    display: none; /* Hidden by default */
}

/* Show when has content class */
.suitesync-booking-ui .ss-calendar-wrap.has-content {
    display: block;
}

.suitesync-booking-ui .ss-availability {
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 500;
}

/* ==========================================================================
   FLATPICKR CALENDAR STYLING
   ========================================================================== */

/* Modern Minimal Flatpickr Calendar Design */
.flatpickr-calendar {
    z-index: 99999 !important;
    position: absolute !important;
    display: none !important;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.5) !important;
    border-radius: 0px !important;
    border: 1px solid #9ca241 !important;
    background: rgba(255, 255, 255, 0.25) !important;
    backdrop-filter: blur(25px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(25px) saturate(180%) !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    overflow: hidden !important;
    width: 345px !important;
    margin-top: 8px !important;
}

.flatpickr-calendar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.3) 0%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(156, 162, 65, 0.05) 100%
    ) !important;
    pointer-events: none !important;
    z-index: -1 !important;
}

.flatpickr-calendar.open {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    animation: fadeInGlass 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    transform: scale(1) translateY(0) !important;
    pointer-events: auto !important;
}

@keyframes fadeInGlass {
    0% {
        opacity: 0;
        transform: scale(0.9) translateY(-15px);
        backdrop-filter: blur(0px);
    }
    50% {
        opacity: 0.7;
        transform: scale(0.98) translateY(-5px);
        backdrop-filter: blur(15px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
        backdrop-filter: blur(30px);
    }
}

/* Calendar Header */
.flatpickr-months {
    background: transparent !important;
    border-bottom: 1px solid rgba(156, 162, 65, 0.25) !important;
    padding: 16px 20px 12px !important;
    backdrop-filter: none !important;
    position: relative !important;
}

.flatpickr-month {
    color: #2d3748 !important;
    font-weight: 600 !important;
    font-size: 16px !important;
}

.flatpickr-prev-month,
.flatpickr-next-month {
    width: 32px !important;
    height: 32px !important;
    border-radius: 8px !important;
    background: rgba(156, 162, 65, 0.15) !important;
    color: #9ca241 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s ease !important;
    backdrop-filter: blur(5px) !important;
    -webkit-backdrop-filter: blur(5px) !important;
}

.flatpickr-prev-month:hover,
.flatpickr-next-month:hover {
    background: rgba(156, 162, 65, 0.3) !important;
    border-color: #9ca241 !important;
    transform: scale(1.05) !important;
    box-shadow: 0 2px 8px rgba(156, 162, 65, 0.2) !important;
}

/* Weekdays Header */
.flatpickr-weekdays {
    background: rgba(255, 255, 255, 0.2) !important;
    padding: 12px 20px !important;
    border-bottom: 1px solid rgba(156, 162, 65, 0.15) !important;
    display: flex !important;
    width: 100% !important;
    justify-content: space-between !important;
}

.flatpickr-weekdays .flatpickr-weekday {
    color: #9ca241 !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.8px !important;
    width: 40px !important;
    height: 24px !important;
    line-height: 24px !important;
    text-align: center !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 1 !important;
    max-width: 40px !important;
}

/* Calendar Days Container */
.flatpickr-days {
    padding: 12px 20px 20px !important;
    background: rgba(255, 255, 255, 0.15) !important;
    display: grid !important;
    grid-template-columns: repeat(7, 1fr) !important;
    gap: 2px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* ==========================================================================
   CONTENT SECTIONS
   ========================================================================== */

/* Guest Information Section */
.guest-info-compact {
    border-radius: 6px;
    margin: 8px 0;
}

.guest-info-compact .ss-row {
    margin-bottom: 8px;
}

/* ==========================================================================
   PAYMENT SECTION
   ========================================================================== */
.payment-section-checkox-wrapper {
    display: grid;
    grid-template-columns: 50fr 50fr;
    gap: 10px;
}
.payment-section-compact {
    background: rgba(255, 255, 255, 0.7);
    border-radius: 6px;
    margin: 16px 0;
}

.payment-section-compact h4 {
    margin: 0px;
    color: #374151;
    font-size: 16px;
    font-weight: 600;
}
.payment-option-label {
    padding-bottom: 10px;
}
.payment-option-compact {
    display: flex;
    align-items: flex-start;
    padding: 16px;
    background: #ffffff;
    border-radius: 8px;
    border: 2px solid #e5e7eb;
    margin-bottom: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 10px !important;
}

.payment-option-compact:hover {
    border-color: #cd8851;
    box-shadow: 0 4px 12px rgba(13, 71, 161, 0.15);
    transform: translateY(-1px);
}

.payment-option-compact input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.payment-option-compact .radio-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 50%;
    margin-right: 12px;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin-top: 2px;
}

.payment-option-compact .radio-custom::after {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ab896e;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.2s ease;
}

.payment-option-compact input[type="radio"]:checked + .radio-custom {
    border-color: #ab896e;
}

.payment-option-compact input[type="radio"]:checked + .radio-custom::after {
    transform: translate(-50%, -50%) scale(1);
}

.payment-option-compact .payment-content {
    flex: 1;
}

.payment-option-compact .payment-title {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 4px;
    font-size: 13px;
}

.payment-option-compact .payment-desc {
    color: #6b7280;
    font-size: 10px;
    line-height: 1.4;
}

/* Payment option checked state */
.payment-option-compact:has(input[type="radio"]:checked) {
    border-color: #b59b85 !important;
    background: linear-gradient(135deg, #f0f8ff 0%, #e6f3ff 100%) !important;
    box-shadow: 0 4px 16px rgba(13, 71, 161, 0.2) !important;
    border-radius: 5px;
    padding: 10px !important;
}

.payment-option-compact:has(input[type="radio"]:checked) .payment-title {
    color: #826751;
}
label.payment-option-compact {
    display: flex;
}
.ss-payment-options {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   PRICING AND BUTTONS
   ========================================================================== */

/* Price Section */
.suitesync-booking-ui .ss-price-row {
    display: flex !important;
    justify-content: center;
    align-items: center;
    font-size: 1em;
    color: #6d5c3d;
    font-weight: 600;
    border-radius: 6px;
    margin: 20px 0;
    padding: 20px;
    background: linear-gradient(135deg, #f8f6f0 0%, #ede8dc 100%);
    border: 2px solid #bfa76a;
    visibility: visible !important;
    opacity: 1 !important;
}

.price-breakdown-container {
    width: 100%;
    text-align: center;
    font-size: 14px;
}

.price-breakdown .price-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(191, 167, 106, 0.3);
}

.price-breakdown .price-item:last-child {
    border-bottom: none;
}

.price-breakdown .price-item.price-total {
    font-weight: bold;
    font-size: 1.1em;
    margin-top: 8px;
    padding-top: 12px;
    border-top: 2px solid #bfa76a;
    border-bottom: none;
}

.price-breakdown .price-label {
    text-align: left;
    flex: 1;
}

.price-breakdown .price-value {
    text-align: right;
    font-weight: 600;
    color: #007cba;
}

/* Buttons */
div#ss-razorpay-row button {
    background: #ab896e !important;
}
.suitesync-booking-ui .ss-btn {
    background: #bfa76a !important;
    color: #fff;
    border: none;
    border-radius: 5px;
    padding: 20px 18px !important;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    box-shadow: 0 2px 6px rgba(191,167,106,0.08);
    width: 100%;
}

.suitesync-booking-ui .ss-btn:hover {
    background: #a08a4a;
}

.suitesync-booking-ui .ss-cancel {
    background: #ababab;
    color: #ffffff;
    border: none;
    border-radius: 5px;
}

.suitesync-booking-ui .ss-cancel:hover {
    background: #e0d7c0;
}

.buttons-compact {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 8px;
    margin-top: 12px;
}

/* ==========================================================================
   BUTTON STATE CLASSES
   ========================================================================== */

.btn-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-enabled {
    opacity: 1;
    cursor: pointer;
    pointer-events: auto;
}

.discount-btn-applied {
    background: #28a745 !important;
}

.discount-btn-default {
    background: #0d47a1 !important;
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */

/* Large screens */
@media (max-width: 900px) {
    .suitesync-booking-ui .ss-col {
        flex: 1 1 180px;
        min-width: 180px;
    }
}

/* Tablet */
@media (max-width: 768px) {
    .suitesync-booking-ui .ss-row-compact {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    /* Two-column layout stays single column on mobile */
    .suitesync-booking-ui .ss-row-compact.ss-row-compact-two-cols {
        grid-template-columns: 1fr;
    }
    
    .buttons-compact {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    
    .booking-guest-input-wrapper {
        min-height: 48px;
    }
    
    .booking-guest-input-wrapper input[type="number"] {
        font-size: 14px;
        padding: 12px 8px;
    }
    
    .booking-guest-decrement,
    .booking-guest-increment {
        width: 35px;
        min-height: 48px;
        font-size: 16px;
    }
}

/* Mobile */
@media (max-width: 600px) {
    .suitesync-booking-ui .ss-row {
        gap: 1em;
    }
    
    .suitesync-booking-ui .ss-col {
        flex: 1 1 100%;
        min-width: 100%;
    }
}

@media (max-width: 576px) {
    .booking-guest-decrement,
    .booking-guest-increment {
        width: 32px;
        font-size: 14px;
    }
    
    .booking-guest-input-wrapper input[type="number"] {
        font-size: 14px;
        padding: 12px 6px;
    }
}

/* ==========================================================================
   GUEST WARNING AND PRICE DISPLAY STYLES (moved from inline JS)
   ========================================================================== */

/* Guest Warning Display */
#guests-warning {
    color: #d32f2f;
    font-size: 12px;
    margin-bottom: 8px;
    display: none; /* Default hidden state */
}

.guests-warning-visible {
    display: block !important;
}

.guests-warning-hidden {
    display: none !important;
}

/* Price Row Display */
.ss-price-row-visible {
    display: flex !important;
}

/* Price Display States */
.suitesync-booking-ui .ss-price-row.price-row-hidden {
    display: flex !important; /* Override hidden state to always show */
    visibility: visible !important;
    opacity: 1 !important;
}

.suitesync-booking-ui .ss-price-row.show-flex {
    display: flex !important;
    margin: 20px 0;
    padding: 20px;
    background: linear-gradient(135deg, #f8f6f0 0%, #ede8dc 100%);
    border: 2px solid #bfa76a;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(191, 167, 106, 0.15);
}

/* Price Breakdown Styles */
.price-breakdown {
    margin-bottom: 15px;
}

.price-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e5e0d0;
}

.price-item:last-child {
    border-bottom: none;
}

.price-label {
    font-weight: 500;
    color: #6d5c3d;
}

.price-value {
    font-weight: 600;
    color: #4a4030;
}

.discount-item {
    background: rgba(40, 167, 69, 0.1);
    padding: 10px;
    border-radius: 4px;
    margin: 5px 0;
    border: 1px solid #28a745;
}

.discount-item .price-label {
    color: #155724;
}

.discount-item .price-value {
    color: #155724;
    font-weight: bold;
}

/* Price Total Container */
.price-total-container {
    background: rgba(191, 167, 106, 0.1);
    padding: 15px;
    border-radius: 6px;
    margin-top: 15px;
    border: 1px solid #bfa76a;
}

.price-total-nights {
    font-size: 12px;
    color: #6d5c3d;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.price-total-original {
    font-size: 14px;
    color: #888;
    text-decoration: line-through;
    margin-bottom: 5px;
}

.price-total-final {
    font-size: 24px;
    font-weight: bold;
    color: #4a4030;
    margin-bottom: 8px;
}

.price-total-savings {
    font-size: 14px;
    color: #28a745;
    font-weight: 600;
    margin-bottom: 10px;
}

.advance-payment-info {
    font-size: 12px;
    color: #6d5c3d;
    padding-top: 10px;
    border-top: 1px solid #d0c5b0;
    margin-top: 8px;
    transition: all 0.3s ease;
}

.advance-payment-info.advance-selected {
    background: rgba(52, 152, 219, 0.1);
    border: 1px solid rgba(52, 152, 219, 0.2);
    border-radius: 6px;
    padding: 12px;
    margin-top: 10px;
}

.advance-payment-info.full-selected {
    background: rgba(46, 204, 113, 0.1);
    border: 1px solid rgba(46, 204, 113, 0.2);
    border-radius: 6px;
    padding: 12px;
    margin-top: 10px;
}

.advance-payment-info.advance-only {
    background: rgba(241, 196, 15, 0.1);
    border: 1px solid rgba(241, 196, 15, 0.2);
    border-radius: 6px;
    padding: 12px;
    margin-top: 10px;
}

.advance-payment-amount {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.advance-payment-subtext {
    font-size: 12px;
    opacity: 0.8;
}

/* Simple total container (no discount) */
.price-total-container.simple .price-total-final {
    font-size: 28px;
    margin-bottom: 5px;
}

/* ==========================================================================
   INFO SPAN STYLES
   ========================================================================== */

.guest-info-span {
    font-size: 0.95em;
    color: #666;
    display: block;
}

/* ==========================================================================
   JAVASCRIPT UTILITY CLASSES (for show/hide via classList)
   ========================================================================== */

.show {
    display: block !important;
}

.show-flex {
    display: flex !important;
}

.hide {
    display: none !important;
}

.visible {
    display: block !important;
}

.hidden {
    display: none !important;
}

/* ==========================================================================
   CALENDAR AVAILABILITY STYLES
   ========================================================================== */

/* Available days - Green */
.flatpickr-day.available-day {
    background: #22c55e !important;
    color: white !important;
    border-color: #16a34a !important;
}

.flatpickr-day.available-day:hover {
    background: #16a34a !important;
    border-color: #15803d !important;
}

/* Fully booked days - Red (disabled) */
.flatpickr-calendar .flatpickr-day.booked-day {
    background: #ef4444 !important;
    color: white !important;
    border-color: #dc2626 !important;
    cursor: not-allowed !important;
}

.flatpickr-calendar .flatpickr-day.booked-day:hover {
    background: #dc2626 !important;
    border-color: #b91c1c !important;
}

/* Resort checkout days - Orange/Green (available for new check-in) */
.flatpickr-calendar .flatpickr-day.ss-checkout-only {
    background: linear-gradient(45deg, #f97316 0%, #f97316 50%, #22c55e 50%, #22c55e 100%) !important;
    color: white !important;
    border-color: #ea580c !important;
    position: relative !important;
}

.flatpickr-calendar .flatpickr-day.ss-checkout-only:hover {
    background: linear-gradient(45deg, #ea580c 0%, #ea580c 50%, #16a34a 50%, #16a34a 100%) !important;
    border-color: #c2410c !important;
}

.flatpickr-calendar .flatpickr-calendar .flatpickr-day.ss-checkout-only::before {
    content: '↓↑';
    position: absolute;
    top: 1px;
    right: 1px;
    font-size: 6px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: bold;
    z-index: 3;
    line-height: 1;
}

/* Check-in only days - Blue/Green (available for check-in only) */
.flatpickr-calendar .flatpickr-day.ss-checkin-only {
    background: linear-gradient(45deg, #3b82f6 0%, #3b82f6 50%, #22c55e 50%, #22c55e 100%) !important;
    color: white !important;
    border-color: #2563eb !important;
    position: relative !important;
}

.flatpickr-calendar .flatpickr-day.ss-checkin-only:hover {
    background: linear-gradient(45deg, #2563eb 0%, #2563eb 50%, #16a34a 50%, #16a34a 100%) !important;
    border-color: #1d4ed8 !important;
}

.flatpickr-calendar .flatpickr-day.ss-checkin-only::before {
    content: '↑';
    position: absolute;
    top: 1px;
    right: 1px;
    font-size: 8px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: bold;
    z-index: 3;
    line-height: 1;
}

/* Checkout days - Half green/half red gradient */
.flatpickr-day.checkout-day {
    background: linear-gradient(45deg, #ef4444 0%, #ef4444 49%, #22c55e 51%, #22c55e 100%) !important;
    color: white !important;
    border: 2px solid #16a34a !important;
    font-weight: bold !important;
    position: relative !important;
}

.flatpickr-day.checkout-day:hover {
    background: linear-gradient(45deg, #dc2626 0%, #dc2626 49%, #16a34a 51%, #16a34a 100%) !important;
    border-color: #15803d !important;
}

/* Alternative checkout day style with diagonal split */
.flatpickr-day.checkout-day::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, transparent 49%, rgba(255,255,255,0.3) 50%, transparent 51%);
    pointer-events: none;
    z-index: 1;
}

/* Enhanced tooltip for checkout days */
.flatpickr-day.checkout-day {
    position: relative;
}

.flatpickr-day.checkout-day::after {
    content: '✓';
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 10px;
    font-weight: bold;
    color: white;
    background: rgba(34, 197, 94, 0.8);
    border-radius: 50%;
    width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

/* Ensure selected dates override availability colors */
.flatpickr-day.selected {
    background: #3b82f6 !important;
    border-color: #2563eb !important;
}

.flatpickr-day.selected.available-day,
.flatpickr-day.selected.checkout-day {
    background: #3b82f6 !important;
}

/* Today's date styling enhancement */
.flatpickr-day.today.available-day {
    background: #059669 !important;
    border: 2px solid #065f46 !important;
}

.flatpickr-day.today.checkout-day {
    border: 3px solid #16a34a !important;
}

/* Calendar legend styles */
.suitesync-calendar-legend {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 10px 0;
    padding: 8px;
    background: #f8fafc;
    border-radius: 6px;
    font-size: 12px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    border: 1px solid #ccc;
}

.legend-available {
    background: #22c55e;
}

.legend-booked {
    background: #ef4444;
}

.legend-checkout {
    background: linear-gradient(45deg, #ef4444 0%, #ef4444 49%, #22c55e 51%, #22c55e 100%);
}