/* ========== Tabs ========== */
.bh-custom-listing-tabs {
    width: 100%;
    margin: 20px 0 24px;
    background: none;
    padding: 0;
}
.bh-custom-listing-tabs ol.tabs {
    list-style-type: none;
    margin: 0 0 0 1rem;
    padding: 0;
    width: 600px;
    border: none;
    border-radius: 0;
    background: none;
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
}
.bh-custom-listing-tabs li {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    margin: 0;
    border: 1px solid var(--wp--preset--color--border, #cfcfcf);
    border-bottom: none;
    background: var(--wp--preset--color--background, #fff);
    font-size: 14px;
    text-align: center;
    box-sizing: border-box;
    border-radius: 3px 3px 0 0;
    transition: background 0.2s;
}
.bh-custom-listing-tabs li:first-child {
    border-left: 1px solid var(--wp--preset--color--border, #cfcfcf);
}
.bh-custom-listing-tabs li:last-child {
    border-right: 1px solid var(--wp--preset--color--border, #cfcfcf);
}
.bh-custom-listing-tabs li a,
.bh-custom-listing-tabs li a:active,
.bh-custom-listing-tabs li a:visited {
    color: inherit;
    text-decoration: none;
    width: 100%;
    height: 100%;
    display: block;
    border: none;
    padding: 10px;
    background: inherit;
    outline: none;
    box-shadow: none;
    border-radius: 3px 3px 0 0;
}
.bh-custom-listing-tabs li.ui-state-active,
.bh-custom-listing-tabs li.ui-tabs-active {
    background: var(--wp--preset--color--background, #fff);
    border-bottom: 1px solid var(--wp--preset--color--background, #fff);
    z-index: 2;
}
.bh-custom-listing-tabs li.ui-state-active a,
.bh-custom-listing-tabs li.ui-tabs-active a {
    color: var(--wp--preset--color--primary, inherit);
    background: var(--wp--preset--color--background, #fff);
}
.bh-custom-listing-tabs li a:hover {
    background: var(--wp--preset--color--hover, #f5f5f5);
}
.bh-custom-listing-tabs .ui-tabs-panel {
    margin-left: 1rem;
}

/* ========== Layout ========== */
.two-col-flex,
.bh-custom-details-wrapper , .bh-custom-listing {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.bh-custom-thumbnail-col {
    flex: 0 0 auto;
    min-width: 250px;
    max-width: 50%;
    width: 400px;
    display: flex;
    flex-direction: column;
    margin-inline-start: 3rem;
    margin-inline-end: 3rem;
}
.bh-custom-details-col {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
.bh-custom-details-wrapper .listing-details {
    width: 100%;
    margin-left: 0;
}
.listing-actions {
    width: 100%;
    margin-top: 1rem;
}
.wpbdp-sidebar-listings .listing-actions {
    display:flex;
    flex-direction: column;
    align-items: flex-start;
    margin-block-start: 48px;
}


/* ========== Main Image ========== */
.bh-custom-main-image {
    width: 100%;
    margin: 0 1rem 0.25rem 1rem;
    display: flex;
    justify-content: flex-end;
    min-height: 225px;
    aspect-ratio: square;
    background: var(--wp--preset--color--background, #f5f5f5);
    position: relative;
}
.bh-custom-main-image img,
.bh-custom-main-image .listing-thumbnail,
.bh-custom-main-image .thickbox {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: 100% !important;
    aspect-ratio: auto;
    border-radius: 4px;
    display: block;
    object-fit: contain;
}

/* ========== Slider ========== */
.bh-custom-slider {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 0 1rem 1rem 1rem;
    min-height: 100px;
    height: 100px;
    box-sizing: border-box;
    background: var(--wp--preset--color--background, #f5f5f5);
}
.bh-custom-slider img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
    display: block;
}
.bh-custom-slider .slick-slide {
    display: flex !important;
    justify-content: center;
    align-items: center;
    height: 100px;
}

/* ========== Loading State ========== */
.bh-custom-main-image.is-loading,
.bh-custom-slider.is-loading {
    visibility: hidden;
}
.bh-custom-slider.is-loading {
    display: flex;
    flex-direction: row;
    gap: 0;
    overflow: hidden;
    min-height: 100px;
}
.bh-custom-slider.is-loading > div {
    flex: 0 0 100px;
    max-width: 100px;
}

/* ========== Slick Arrows ========== */
.slick-arrow,
.bh-custom-slider .slick-arrow {
    background: transparent !important;
    border: none !important;
    color: var(--wp--preset--color--primary, #333);
    width: 36px;
    height: 36px;
    opacity: 0.8;
    transition: opacity 0.2s;
}
.slick-prev:before,
.slick-next:before {
    color: var(--wp--preset--color--primary, #333) !important;
    opacity: 1 !important;
    font-size: 32px;
}
.bh-custom-slider .slick-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
}
.bh-custom-slider .slick-prev {
    left: -40px;
}
.bh-custom-slider .slick-next {
    right: -40px;
}
.bh-custom-slider .slick-arrow:hover {
    opacity: 1;
    background: var(--wp--preset--color--hover, #f5f5f5);
}

/* ========== Search Form Alignment ========== */
.main-fields .box-row {
    align-items: flex-end; /* Align all items to bottom */
}

.wpbdp-proximity-search-unit .wpbdp-search-filter {
    margin-bottom: 0; /* Remove any bottom margin */
}

/* Ensure submit button matches input height */
.submit-btn{
   align-self: flex-end; /* Align submit button to bottom */
   flex: 0 0 auto; /* Don't grow or shrink */
}

/* Override BD's flex: 1 setting for proximity search unit specifically */
.wpbdp-main-box .main-fields form .search-fields .box-row .wpbdp-proximity-search-unit {
    flex: 0 0 180px !important; /* Don't grow, don't shrink, fixed 180px */
    width: 180px !important; /* Ensure width is set */
    max-width: 180px; /* Prevent it from getting larger */
}

/* Ensure main input can still grow to fill remaining space */
.wpbdp-main-box .main-fields form .search-fields .box-row .main-input {
    flex: 1 1 200px !important; /* Grow to fill space, min 200px */
    min-width: 200px;
}

/* ========== Responsive ========== */
@media screen and (max-width: 700px) {
    .bh-custom-listing-tabs ol.tabs {
        display: block;
    }
    .bh-custom-listing-tabs li {
        display: block;
        width: 100%;
        border-radius: 0;
        margin-bottom: 2px;
    }
    .bh-custom-listing-tabs li a {
        border-radius: 0;
    }
    .two-col-flex,
    .bh-custom-details-wrapper {
        flex-direction: column;
        gap: 1rem;
    }
    .bh-custom-thumbnail-col,
    .bh-custom-details-col {
        width: 100%;
    }
}
/* ========== Listings Layout ========== */
.wpbdp-layout {
    display: flex;
    gap: 2rem;
}
.wpbdp-sidebar {
    width: 250px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 2rem; /* space between categories and regions */
    float:left;
}
.wpbdp-region-sidelist-wrapper{
    width:100%;
}
.wpbdp-main {
    flex: 1 1 0;
}

@media (max-width: 900px) {
    .wpbdp-layout {
        flex-direction: column;
    }
    .wpbdp-sidebar {
        width: 100%;
    }
}
@media (max-width: 600px) {
  .custom-map-size {
    width: 100%;
    max-width: 600px;
    height: 300px;
    margin: 0 auto 2rem auto;
}
.custom-map-size iframe,
.custom-map-size > div {
    width: 100% !important;
    height: 100% !important;
}
}

/* Hide specific options in the select dropdown */
#wpbdp-main-box select[name="listingfields[27]"] option[value="-1"],
#wpbdp-main-box select[name="listingfields[27]"] option[value=""] {
    display: none;
}



