/**
 * SuiteSync Booking Form - Complete CSS Styles
 * Consolidated from all sources: inline CSS, hotel-booking.css, booking-form-ext.css
 **/

/* ==========================================================================
   BASE BOOKING FORM STYLES
   ========================================================================== */

/* Main Booking Form Container */
.suitesync-booking-form { 
    margin: 20px auto; 
    background: #f9f9f9; 
    border-radius: 8px; 
}

#suitesync-booking-form {
    background: transparent !important;
}

/* Booking UI Container */
.suitesync-booking-ui {
    border-radius: 10px;
    padding: 16px;
    width: 100%;
    margin: 0 auto;
    font-family: 'Segoe UI', 'Roboto', Arial, sans-serif;
    font-size: 14px;
    max-width: none;
}

/* 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;
}

/* 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;
}

/* ==========================================================================
   FORM ELEMENTS - LABELS
   ========================================================================== */

.suitesync-booking-ui label {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 4px 8px;
    border-radius: 2px;
    display: inline-block;
}

/* Override for theme compatibility */
.suitesync-booking-ui label {
    font-weight: 600;
    color: #3b3b3b !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;
    border: 1px solid #a9ab9000;
}

.booking-guest-input-wrapper input[type="number"] {
    flex: 1;
    border: none !important;
    border-radius: 0 !important;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: #6e7149 !important;
    padding: 12px 10px;
    min-height: 52px;
    box-sizing: border-box;
    -moz-appearance: textfield;
    appearance: textfield;
    width: auto;
}

/* 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);
}

.capacity-hint {
    font-size: 10px;
    color: #666;
    margin-top: 2px;
}

/* ==========================================================================
   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: rgba(255, 255, 255, 0.3) !important;
    border-bottom: 1px solid rgba(156, 162, 65, 0.25) !important;
    padding: 16px 20px 12px !important;
    backdrop-filter: blur(5px) !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-compact {
    background: rgba(255, 255, 255, 0.7);
    border-radius: 6px;
    padding: 10px;
    margin: 16px 0;
}

.payment-section-compact h4 {
    margin: 0 0 12px 0;
    color: #374151;
    font-size: 16px;
    font-weight: 600;
}

.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);
}

.payment-option-compact:hover {
    border-color: #0d47a1;
    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: #0d47a1;
    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: #0d47a1;
}

.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: 15px;
}

.payment-option-compact .payment-desc {
    color: #6b7280;
    font-size: 13px;
    line-height: 1.4;
}

/* Payment option checked state */
.payment-option-compact:has(input[type="radio"]:checked) {
    border-color: #0d47a1 !important;
    background: linear-gradient(135deg, #f0f8ff 0%, #e6f3ff 100%) !important;
    box-shadow: 0 4px 16px rgba(13, 71, 161, 0.2) !important;
}

.payment-option-compact:has(input[type="radio"]:checked) .payment-title {
    color: #0d47a1;
}
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;
    justify-content: center;
    align-items: center;
    margin-top: 29px;
    font-size: 1em;
    color: #6d5c3d;
    font-weight: 600;
    border-radius: 6px;
}

.price-breakdown-container {
    width: 100%;
    text-align: center;
    font-size: 14px;
}

/* Buttons */
div#ss-razorpay-row button {
    background: #9a9c7a !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 Breakdown Elements */
.price-breakdown-container-wrap {
    width: 100%;
}

.price-total-label {
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 4px;
}

.price-total-amount {
    font-size: 18px;
    font-weight: bold;
    color: #0d47a1;
}

/* ==========================================================================
   DYNAMIC CONTENT STYLES (JavaScript-generated)
   ========================================================================== */

/* Advance Payment Display */
.advance-payment-info {
    font-size: 20px;
    color: #656565;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #e0e0e0;
}

.advance-payment-subtext {
    font-size: 15px;
    color: #666;
    margin-top: 2px;
}

/* Price Item Styles */
.price-item.offer-price .price-value {
    color: #28a745;
    font-weight: bold;
}

.price-item.discount-item {
    border-left-color: #28a745;
}

.price-item.discount-item .price-value {
    color: #28a745;
}

/* Price Total Container Styles */
.price-total-container {
    text-align: center;
    padding: 8px;
    background: linear-gradient(135deg, #f8f9fa 0%, #f8f6f2 100%);
    border-radius: 5px;
    border: 1px solid #b9b9b9;
}

.price-total-container.simple {
    background: #f8f9fa;
    padding: 12px;
}

.price-total-nights {
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 4px;
}

.price-total-original {
    font-size: 14px;
    color: #999;
    text-decoration: line-through;
}

.price-total-final {
    font-size: 22px;
    font-weight: bold;
    color: #22ad95;
    margin: 2px 0;
}

.price-total-savings {
    font-size: 11px;
    color: #28a745;
    font-weight: 600;
}

/* Auto Discount Display */
.auto-discount-display .original-price {
    text-decoration: line-through;
    color: #999;
    font-size: 14px;
}

.auto-discount-display .discounted-price {
    color: #28a745;
    font-weight: bold;
    font-size: 16px;
}

.auto-discount-display .discount-text {
    color: #28a745;
    margin-left: 8px;
    font-size: 12px;
}

/* Discount Message Styles */
.discount-message-success {
    color: #28a745;
}

.discount-message-error {
    color: #d63384;
}

/* ==========================================================================
   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;
}