/* Main search bar container */
.hidden {
    display: none;
}

.search-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    flex-direction: column;
    justify-self: center;
    max-width: fit-content;
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    padding: 16px;
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.search-bar-main {
    display: flex;
    flex-direction: row;
}

/* Search components section (left side) */
.search-bar-components {
    display: flex;
    flex-wrap: wrap;
    flex: 1;
    gap: 8px;
    align-items: stretch;
}

/* Individual component styling */
.date-selector,
.dropdown-selector {
    flex: 1;
    /* min-width: 160px; */
    margin-right: 4px;
    position: relative;
}

.component-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

/* Fields and button styling */
input.search-bar-component,
select.search-bar-component,
button.search-bar-component {
    width: auto;
    padding: 10px 12px;
    border: 1px solid #e7e7e7;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    background-color: #f9f9f9;
    transition: border-color 0.2s, box-shadow 0.2s;
}


/* Button fields */
.search-bar-component:focus {
    border-color: #0071c2;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 113, 194, 0.2);
}

/* Date selector specific */
.date-selector input {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23666' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 0a.5.5 0 0 1 .5.5V1h8V.5a.5.5 0 0 1 1 0V1h1a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h1V.5a.5.5 0 0 1 .5-.5zM1 4v10a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V4H1z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: calc(100% - 10px) center;
    padding-right: 30px;
}

/* Dropdown selector specific */

/* Dropdown components section */
.dropdown-custom {
    /* Hidden by default, shown on click */
    width: 100%;
    background-color: #fff;
    transition: 1s ease;
    min-height: 0px;
    max-height: 0px;
}

.dropdown-components.open,
.dropdown-custom.open {
    max-height: 100%;
}

/* Dropdown toggle button */
.dropdown-toggle-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: 1px solid #e7e7e7;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    background-color: #f9f9f9;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.dropdown-toggle-button:hover {
    border-color: #0071c2;
    background-color: #f0f8ff;
}

.dropdown-toggle-button:focus {
    border-color: #0071c2;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 113, 194, 0.2);
}

.dropdown-toggle-button.active {
    border-color: #0071c2;
    background-color: #e6f4ff;
    color: #0071c2;
}

.dropdown-toggle-button .dropdown-arrow {
    font-size: 10px;
    transition: transform 0.2s ease;
}

.dropdown-toggle-button.active .dropdown-arrow {
    transform: rotate(180deg);
}

/* Dropdown components container */
.dropdown-components {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 16px;
    margin-top: 12px;
    border-top: 1px solid #e7e7e7;
    background-color: #fafafa;
    border-radius: 4px;
}

/* Bedroom and bathroom selectors */
.bedrooms-selector,
.bathrooms-selector {
    flex: 1;
    min-width: 150px;
}

.bedrooms-selector label,
.bathrooms-selector label,
.dropdown-selector label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}

.bedrooms-selector select,
.bathrooms-selector select,
.dropdown-component {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e7e7e7;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    background-color: #fff;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.bedrooms-selector select:hover,
.bathrooms-selector select:hover,
.dropdown-component:hover {
    border-color: #0071c2;
}

.bedrooms-selector select:focus,
.bathrooms-selector select:focus,
.dropdown-component:focus {
    border-color: #0071c2;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 113, 194, 0.2);
}

/* Amenities in dropdown */
.dropdown-components .bide-amenities-filter-row {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 0;
}

.dropdown-components .bide-amenity-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.dropdown-components .bide-amenity-checkbox:hover {
    background-color: #f0f8ff;
}

.dropdown-components .bide-amenity-checkbox input[type="checkbox"] {
    cursor: pointer;
    width: 16px;
    height: 16px;
}

/* Search button */
.search-bar button[type="submit"] {
    background-color: #0071c2;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    height: 48px;
    margin-left: 8px;
}

.search-bar button[type="submit"]:hover {
    background-color: #00508d;
}

/* Responsive design */
@media (max-width: 768px) {
    .search-bar {
        flex-direction: column;
        padding: 12px;
    }

    .search-bar-components {
        flex-direction: column;
    }

    .date-selector,
    .dropdown-selector {
        margin-right: 0;
        margin-bottom: 12px;
        /* width: 100%; */
    }

    .search-bar button[type="submit"] {
        width: 100%;
        margin-left: 0;
        margin-top: 8px;
    }
}

/* Datepicker calendar styling (requires jQuery UI datepicker or similar) */
.ui-datepicker {
    width: 300px;
    padding: 10px;
    border: none;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
    background-color: #fff;
    border-radius: 4px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.ui-datepicker .ui-datepicker-header {
    background-color: #0071c2;
    color: white;
    border-radius: 4px 4px 0 0;
    padding: 10px;
}

.ui-datepicker .ui-datepicker-title {
    text-align: center;
    font-weight: 600;
}

.ui-datepicker .ui-datepicker-prev,
.ui-datepicker .ui-datepicker-next {
    cursor: pointer;
    position: absolute;
    top: 10px;
}

.ui-datepicker .ui-datepicker-prev {
    left: 10px;
}

.ui-datepicker .ui-datepicker-next {
    right: 10px;
}

.ui-datepicker table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 5px;
}

/* Main search bar container */
.search-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    padding: 16px;
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Search components section (left side) */
.search-bar-components {
    display: flex;
    flex-wrap: wrap;
    flex: 1;
    gap: 8px;
}

/* Individual component styling */

/* Label styling */
.date-selector label,
.dropdown-selector label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

/* Search button */
.search-bar button[type="submit"] {
    background-color: #0071c2;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    height: 48px;
    margin-left: 8px;
    align-self: center;
}

.search-bar button[type="submit"]:hover {
    background-color: #00508d;
}

/* Responsive design */
@media (max-width: 768px) {
    .search-bar {
        flex-direction: column;
        padding: 12px;
    }

    .search-bar-components {
        flex-direction: column;
    }

    .date-selector,
    .dropdown-selector {
        margin-right: 0;
        margin-bottom: 12px;
        /* width: 100%; */
    }

    .search-bar button[type="submit"] {
        width: 100%;
        margin-left: 0;
        margin-top: 8px;
    }
}

/* Datepicker calendar styling (requires jQuery UI datepicker or similar) */
.ui-datepicker {
    width: 300px;
    padding: 10px;
    border: none;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
    background-color: #fff;
    border-radius: 4px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.ui-datepicker .ui-datepicker-header {
    background-color: #0071c2;
    color: white;
    border-radius: 4px 4px 0 0;
    padding: 10px;
}

.ui-datepicker .ui-datepicker-title {
    text-align: center;
    font-weight: 600;
}

.ui-datepicker .ui-datepicker-prev,
.ui-datepicker .ui-datepicker-next {
    cursor: pointer;
    position: absolute;
    top: 10px;
}

.ui-datepicker .ui-datepicker-prev {
    left: 10px;
}

.ui-datepicker .ui-datepicker-next {
    right: 10px;
}

.ui-datepicker table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 5px;
}

#bide-search-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;

}

.property-cards-group {
    display: grid;
    gap: 40px;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    width: 100%;
    justify-items: center;
    align-items: center;
}

/* Custom Calendar Styles */
.custom-calendar-popup {
    position: absolute;
    top: 48px;
    left: 0;
    z-index: 100;
    background: #fff;
    border: 1px solid #e7e7e7;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 1em;
    min-width: 300px;
    display: none;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    width: 100%;
}

.calendar-day-label {
    font-size: 12px;
    color: #888;
    text-align: center;
    padding: 0.2em 0;
}

.calendar-date {
    text-align: center;
    cursor: pointer;
    border-radius: 50%;
    margin: 8px;
    transition: background 0.2s;
    min-width: 50px;
    max-width: 50px;
    min-height: 50px;
    max-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-date:hover:not(.empty) {
    background: #f0f0f0;
}

.calendar-date.selected {
    background: #4CAF50;
    color: #fff;
}

.calendar-date.disabled {
    color: #ccc;
    pointer-events: none;
    background: #f5f5f5;
    cursor: not-allowed;
}

.calendar-date.empty {
    background: none;
    cursor: default;
}

.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5em;
    width: 100%;
}

.calendar-header button.prev-month,
.calendar-header button.next-month {
    background: #f5f5f7;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
    font-size: 18px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    color: #333;
    padding: 0;
}

.calendar-header button.prev-month:hover,
.calendar-header button.next-month:hover {
    background: #e0e7ef;
    color: #1976d2;
    box-shadow: 0 2px 8px rgba(25, 118, 210, 0.08);
}

.calendar-header span {
    flex: 1;
    text-align: center;
    font-weight: 600;
    font-size: 1.1em;
    color: #222;
}

.dates {
    display: flex;
    gap: 2em;
}

.dates>label {
    display: none;
}

.calendar-flexible-options {
    margin-top: 16px;
    padding: 8px 0;
    border-top: 1px solid #eee;
    text-align: center;
}

.calendar-flexible-selects {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 8px;
}

.calendar-flexible-btn {
    background: #f5f5f5;
    border: 1px solid #ccc;
    border-radius: 20px;
    padding: 6px 16px;
    cursor: pointer;
    font-size: 14px;
}

.calendar-flexible-btn.selected {
    background: #007a87;
    color: #fff;
    border-color: #007a87;
}

/**
* Dates Bar
*/

.flexible-dates-bar-container {
    width: 100%;
    overflow: hidden;
    margin-bottom: 24px;
    border-bottom: 2px solid #eee;
    display: inline-flex;
    justify-content: center;
    align-items: center;
}

.flexible-dates-bar {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding-bottom: 8px;
    transition: all 0.3s ease;
}

.flexible-date-tab {
    flex: 1 1 0;
    background: #f5f5f5;
    border: none;
    border-radius: 0;
    padding: 12px 0;
    font-size: 16px;
    color: #333;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    border-bottom: 2px solid transparent;
    outline: none;
    min-width: 100px;
    max-width: 100px;
}

.flexible-date-tab.selected {
    background: #fff;
    color: #1976d2;
    border-bottom: 2px solid #1976d2;
    font-weight: 600;
}

.flexible-date-tab:hover:not(.selected) {
    background: #e0e7ef;
    color: #1976d2;
}

.bide-raw-results {
    margin-top: 20px;
    margin-bottom: 20px;
    padding: 16px;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 100%;
}

.bide-raw-results h3 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 16px;
}

.bide-raw-results pre {
    background-color: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 12px;
    overflow-x: auto;
    overflow-y: auto;
    max-height: 500px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.4;
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/** Drop Down Container styles */
.location {
    display: flex;
    flex-direction: column;
}

.drop-down-menu.hidden {
    display: none;
}

.drop-down-menu#location_menu .drop-down-options-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    grid-template-rows: auto;
    padding: 2em;
}

.drop-down-button-container {
    height: 100%;
}

.drop-down-container {
    position: relative;
    height: 100%;
    display: flex;
}

.search-bar-location-container {
    height: 100%;
}

.search-bar-location {
    height: 100%;
}

/**
Auto Complete Dropdown
*/
.auto-complete-dropdown {
    max-height: 150px;
    background: white;
    overflow: scroll;
    z-index: 9999;
    position: absolute;
    padding: 0.5em;
}


.auto-complete-hidden {
    display: none;
}

/* ============================================
   Dropdown Feature - Responsive Styles
   ============================================ */
@media (max-width: 768px) {

    /* Dropdown toggle button responsive */
    .dropdown-toggle-button {
        width: 100%;
        justify-content: center;
        margin-bottom: 8px;
    }

    /* Dropdown components responsive */
    .dropdown-components {
        flex-direction: column;
        padding: 12px;
        gap: 8px;
    }

    .bedrooms-selector,
    .bathrooms-selector {
        min-width: 100%;
        width: 100%;
    }

    .dropdown-components .bide-amenities-filter-row {
        flex-direction: column;
        gap: 8px;
    }

    .dropdown-components .bide-amenity-checkbox {
        width: 100%;
    }
}