/* SuiteSync Accommodation Search Block - Frontend Styles */

.suitesync-search-widget {
    background: var(--search-bg-color, transparent);
    color: var(--search-text-color, #333);
    border-radius: 0px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
    border: 1px solid rgb(171 137 110);
    position: relative !important;
}

.search-widget-title {
    color: #f8f8f8;
    font-size: 24px;
    margin: 0 0 20px 0;
    font-weight: 600;
}

.suitesync-search-form {
    width: 100%;
}

/* Layout Styles */
.search-fields.horizontal {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr auto;
    align-items: end;
}
.search-fields.horizontal:first-child  .search-field input{
    border-right: 0px !important;
}
.search-fields.horizontal:last-child  .search-field select{
    border-right: 0px !important;
}
.search-fields.vertical {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.search-fields.compact {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.search-fields.compact .search-button-field {
    grid-column: 1 / -1;
}

/* Field Styles */
.search-field {
    display: flex;
    flex-direction: column;
    position: relative !important;
}

.search-field label {
    font-size: 12px;
    font-weight: 600;
    color: #e9eda7;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
/* Check-in and check-out field styling */
.search_checkin_field {
    border-radius: 10px 0 0 10px !important;
    position: relative;
}


.search_checkout_field {
    border-radius: 0 10px 10px 0 !important;
    position: relative;
}

/* Style the container holding the check-in field */
.search-fields.horizontal .search-field:first-child {
    position: relative;
}

/* Separator line between check-in and check-out - target the first search-field container */
.search-fields.horizontal .search-field:first-child::after {
    content: "";
    position: absolute;
    top: 24px;
    right: 27px;
    height: calc(124% - 46px);
    width: 2px;
    background: linear-gradient(179deg,rgb(255 255 255 / 0%) 0%, rgb(219 227 85 / 36%) 14%, rgb(219 227 85 / 42%) 86%, rgb(237 221 83 / 0%) 100%);
    z-index: 10;
    pointer-events: none;
}

/* Alternative approach - target by checking if container has the check-in field */
.search_checkin_field {
    position: relative;
}

.search-field input,
.search-field select {
    padding: 12px 15px;
    border: none;
    font-size: 14px;
    background: #bdad8370;
    transition: all 0.3s ease;
    min-height: 48px;
    color: #fff !important;
}
.search-field input::placeholder,
.search-field select::placeholder {
    color:#f5f5f5;
}

.search-field input:focus,
.search-field select:focus {
    outline: none;
    border-color: #bfa76a;
    box-shadow: 0 0 0 3px rgba(191, 167, 106, 0.1);
}

/* Button Styles */
.search-submit-btn {
    background: #ab896e;
    color: #ffffff;
    border: none;
    padding: 12px 25px;
    border-radius: 10px 10px 10px 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 13px;
    white-space: nowrap;
    margin-left: 10px;
}

.search-submit-btn:hover {
    background: linear-gradient(135deg, #a6956b, #96845c);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.search-submit-btn i {
    font-size: 16px;
}

/* Animation */
.suitesync-search-widget {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .suitesync-search-widget {
        padding: 20px;
        margin: 15px 0;
    }
    
    .search-widget-title {
        font-size: 24px;
        margin-bottom: 20px;
    }
    
    .search-fields.horizontal {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .search-fields.compact {
        grid-template-columns: 1fr;
    }
    
    .search-field input,
    .search-field select,
    .search-submit-btn {
        min-height: 48px;
        padding: 12px 14px;
    }
    
    .search-guest-input-wrapper {
        min-height: 48px;
    }
    
    .search-guest-input-wrapper input[type="number"] {
        font-size: 14px;
        padding: 12px 8px;
    }
    
    .search-guest-decrement,
    .search-guest-increment {
        width: 35px;
        min-height: 48px;
        font-size: 16px;
    }
    
    .search-field label {
        font-size: 12px;
    }
}
@media (max-width: 576px) {
    .suitesync-search-widget {
        padding: 15px;
    }
    
    .search-widget-title {
        font-size: 20px;
    }
    
    .search-fields {
        gap: 12px;
    }
    
    .search-submit-btn {
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .search-guest-decrement,
    .search-guest-increment {
        width: 32px;
        font-size: 14px;
    }
    
    .search-guest-input-wrapper input[type="number"] {
        font-size: 14px;
        padding: 12px 6px;
    }
}

/* Special styling for overlay/banner usage */
.suitesync-search-widget.banner-overlay {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    width: 90%;
    max-width: 800px;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(15px);
}

.suitesync-search-widget.banner-overlay .search-widget-title {
    text-align: center;
    margin-bottom: 20px;
}

/* Dark theme support - updated for modern design */
@media (prefers-color-scheme: dark) {
    .suitesync-search-widget {
        background: rgba(45, 55, 72, 0.95);
        color: #e2e8f0;
    }
    
    .search-widget-title {
        color: #e2e8f0;
    }
    
    .search-field input,
    .search-field select {
        background: #4a5568;
        border-color: #718096;
        color: #e2e8f0;
    }
    
    .search-field label {
        color: #cbd5e0;
    }
    
    .search-field input:focus,
    .search-field select:focus {
        border-color: #63b3ed;
        box-shadow: 0 0 0 3px rgba(99, 179, 237, 0.1);
    }
}

/* Additional visual enhancements */
.suitesync-search-widget::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    background: linear-gradient(45deg, #3498db10, #27ae6010, #3498db10);
    border-radius: 13px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.suitesync-search-widget:hover::before {
    opacity: 1;
}

/* Form spacing and alignment */
.suitesync-search-form {
    width: 100%;
}

/* Center alignment for banner overlay */
.banner-overlay .suitesync-search-form {
    text-align: left;
}

.banner-overlay .search-fields.horizontal {
    justify-items: stretch;
}

/* Guest Input Field with Increment/Decrement Buttons */
.search-guest-input-wrapper {
    display: flex;
    align-items: center;
    position: relative;
    background: #bdad8370;
    border: none;
    border-radius: 10px;
    overflow: hidden;
    padding: 5px;
    height: 48px;
    margin-left: 10px;
}

.search-guest-input-wrapper input[type="number"] {
    flex: 1;
    border: none !important;
    background: transparent !important;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: #fff !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    padding: 12px 10px;
    min-height: 46px;
    box-sizing: border-box;
    -moz-appearance: textfield; /* Hide spinner arrows in Firefox */
    appearance: textfield; /* Standard property for compatibility */
}

/* Hide spinner arrows in WebKit browsers */
.search-guest-input-wrapper input[type="number"]::-webkit-outer-spin-button,
.search-guest-input-wrapper input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.search-guest-input-wrapper input[type="number"]:focus {
    outline: none;
    box-shadow: none;
}

.search-guest-input-wrapper:focus-within {
    border-color: #bfa76a;
    box-shadow: 0 0 0 3px rgba(191, 167, 106, 0.1);
}

.search-guest-decrement,
.search-guest-increment {
    background: #45454585;
    color: #fff;
    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;
    border-radius: 6px;
}

.search-guest-decrement:hover,
.search-guest-increment:hover {
    background: #bfa76a;
    transform: scale(1.05);
}

.search-guest-decrement:active,
.search-guest-increment:active {
    transform: scale(0.95);
}

/* ==========================================================================
   FLATPICKR CALENDAR STYLES (moved from inline CSS)
   ========================================================================== */

/* Ensure proper positioning context for calendar */
.suitesync-search-widget {
    position: relative !important;
}

.search-field {
    position: relative !important;
}

/* Modern Minimal Flatpickr Calendar Design for Search Widget */
.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-months::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.2) 0%,
        rgba(255, 255, 255, 0.05) 100%
    ) !important;
    pointer-events: none !important;
    z-index: -1 !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;
    border: 1px solid rgba(156, 162, 65, 0.4) !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;
}

.flatpickr-days .dayContainer {
    display: grid !important;
    grid-template-columns: repeat(7, 1fr) !important;
    gap: 2px !important;
    width: 100% !important;
}

/* Individual Day Cells */
.flatpickr-days .flatpickr-day {
    width: 40px !important;
    height: 40px !important;
    line-height: 40px !important;
    border-radius: 8px !important;
    margin: 0 !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #2d3748 !important;
    background: rgba(255, 255, 255, 0.4) !important;
    border: 1px solid rgba(156, 162, 65, 0.2) !important;
    transition: all 0.3s ease !important;
    position: relative !important;
    text-align: center !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    max-width: 40px !important;
    min-width: 40px !important;
}

.flatpickr-day:hover:not(.disabled):not(.selected) {
    background: rgba(156, 162, 65, 0.1) !important;
    border-color: rgba(156, 162, 65, 0.3) !important;
    color: #2d3748 !important;
    transform: scale(1.05) !important;
}

.flatpickr-day.selected {
    background: linear-gradient(135deg, #9ca241, #8a9337) !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    border: 2px solid #9ca241 !important;
    box-shadow: 
        0 4px 12px rgba(156, 162, 65, 0.4),
        0 0 0 2px rgba(255, 255, 255, 0.3) !important;
}

.flatpickr-day.today:not(.selected) {
    background: rgba(156, 162, 65, 0.25) !important;
    color: #2d3748 !important;
    font-weight: 600 !important;
    border: 2px solid #9ca241 !important;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.4) !important;
}

.flatpickr-day.today.selected {
    background: #9ca241 !important;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.8), 0 0 0 4px #9ca241 !important;
}

/* Past dates - disabled styling */
.flatpickr-day.disabled,
.flatpickr-day.prevMonthDay,
.flatpickr-day.nextMonthDay {
    color: rgba(45, 55, 72, 0.3) !important;
    cursor: not-allowed !important;
    background: rgba(255, 255, 255, 0.3) !important;
    border-color: transparent !important;
}

.flatpickr-day.disabled:hover,
.flatpickr-day.prevMonthDay:hover,
.flatpickr-day.nextMonthDay:hover {
    transform: none !important;
    background: rgba(255, 255, 255, 0.3) !important;
    border-color: transparent !important;
}

/* Range Selection */
.flatpickr-day.inRange {
    background: rgba(156, 162, 65, 0.15) !important;
    color: #2d3748 !important;
    border-radius: 0 !important;
    border-color: rgba(156, 162, 65, 0.2) !important;
}

.flatpickr-day.startRange {
    border-radius: 8px 0 0 8px !important;
    background: #9ca241 !important;
    color: #ffffff !important;
}

.flatpickr-day.endRange {
    border-radius: 0 8px 8px 0 !important;
    background: #9ca241 !important;
    color: #ffffff !important;
}

.flatpickr-day.startRange.endRange {
    border-radius: 8px !important;
}

/* Search widget date input styling */
.search-date-picker {
    cursor: pointer !important;
    position: relative;
    background: rgba(189, 173, 131, 0.4) !important;
    border-color: #9a9c7a !important;
}

.search-date-picker:focus {
    border-color: #9ca241 !important;
    box-shadow: 0 0 0 3px rgba(156, 162, 65, 0.1) !important;
}

.search-date-picker::after {
    content: "📅";
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    font-size: 16px;
    opacity: 0.7;
}

/* Calendar arrow navigation styling */
.flatpickr-prev-month svg,
.flatpickr-next-month svg {
    fill: #9ca241 !important;
    width: 16px !important;
    height: 16px !important;
    filter: drop-shadow(0 1px 2px rgba(156, 162, 65, 0.2)) !important;
}

.flatpickr-prev-month:hover svg,
.flatpickr-next-month:hover svg {
    fill: #8a9337 !important;
    filter: drop-shadow(0 2px 4px rgba(156, 162, 65, 0.3)) !important;
}

/* Month/Year dropdowns */
.flatpickr-monthDropdown-months,
.flatpickr-current-month input.cur-year {
    background: rgba(255, 255, 255, 0.8) !important;
    border: 1px solid rgba(156, 162, 65, 0.3) !important;
    color: #2d3748 !important;
}

/* Responsive adjustments for calendar */
@media (max-width: 480px) {
    .flatpickr-calendar {
        border-radius: 8px !important;
        border-width: 1px !important;
    }
    
    .flatpickr-months,
    .flatpickr-weekdays,
    .flatpickr-days {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }
    
    .flatpickr-day {
        width: 32px !important;
        height: 32px !important;
        line-height: 32px !important;
        font-size: 13px !important;
    }
}

/* Glass effect enhancement */
@supports (backdrop-filter: blur(10px)) {
    .flatpickr-calendar {
        background: rgba(255, 255, 255, 0.2) !important;
        backdrop-filter: blur(30px) saturate(200%) !important;
        -webkit-backdrop-filter: blur(30px) saturate(200%) !important;
    }
    
    .flatpickr-months {
        background: rgba(255, 255, 255, 0.25) !important;
        backdrop-filter: blur(15px) !important;
        -webkit-backdrop-filter: blur(15px) !important;
    }
    
    .flatpickr-weekdays {
        background: rgba(255, 255, 255, 0.15) !important;
        backdrop-filter: blur(10px) !important;
        -webkit-backdrop-filter: blur(10px) !important;
    }
    
    .flatpickr-days {
        background: rgba(255, 255, 255, 0.1) !important;
        backdrop-filter: blur(8px) !important;
        -webkit-backdrop-filter: blur(8px) !important;
    }
}

/* ==========================================================================
   SEARCH RESULTS SUMMARY STYLES (moved from inline CSS)
   ========================================================================== */

.suitesync-search-summary {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #bfa76a;
}

.suitesync-search-summary h4 {
    margin: 0 0 10px 0;
    color: #333;
}

.suitesync-search-summary p {
    margin: 0;
    color: #666;
}

.suitesync-search-summary p:last-child {
    margin: 8px 0 0 0;
    font-size: 13px;
    color: #888;
}

/* ==========================================================================
   END OF MOVED INLINE STYLES
   ========================================================================== */
