/* 
   Search Form & Results CSS 
   Airbnb Inspired 
*/

:root {
    --bab-primary: #ff385c;
    --bab-secondary: #008489;
    --bab-text: #222222;
    --bab-muted: #717171;
    --bab-border: #dddddd;
    --bab-bg: #ffffff;
    --bab-shadow: 0 6px 20px rgba(0,0,0,0.1);
    --bab-radius: 32px;
    --bab-radius-item: 12px;
}
.bab-search-form {
    display: flex;
    align-items: center;
    background: var(--bab-bg);
    border: 1px solid #71717133;
    border-radius: 34px;
    box-shadow: -6px 3px 20px rgb(0 0 0 / 6%);
    padding: 8px;
    width: 100%;
    margin: 0 auto;
    transition: all 0.3s ease;
}

/*.bab-search-form:focus-within {
    border-color: transparent;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}*/

.bab-search-form:focus-within {
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    transform: none; /* prevent shift */
}

.search-field {
    flex: 1;
    padding: 0px 20px;
    position: relative;
}
.search-field:last-of-type {
    border-right: none;
}

.search-field label {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: #000;
    margin-bottom: 2px;
    font-family: 'Nunito';
}

.search-field input, 
.search-field select {
    border: none;
    background: transparent;
    font-size: 14px;
    color: #888888;
    width: 100%;
    outline: none;
    padding: 0;
    font-family: 'Nunito';
    font-weight: 500;
	height: auto;
}

.search-field input::placeholder {
    color: #999;
}
.mobile-search input::placeholder {
    color: #000000;
}

.search-submit {
    padding-right: 8px;
}
/* Mobile only */
.search-input {
    text-align: center;
}
.search-btn {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px !important;
    height: 40px !important;
    border: none;
    cursor: pointer;
    padding: 0;
	border-radius: 50%;	
}
.search-container {
    position: relative;
    margin: auto;
}
.search-submit button {
    padding: 0;
    background: #007BFF;
    color: #fff;
    border: none;
    border-radius: 50%;
    height: 48px;
    width: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s;
}
.search-input {
    width: 100% !important;
    height: 55px !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    border: 2px solid #9e9e9e !important;
    border-radius: 50px !important;
    outline: none;
    box-sizing: border-box !important;
}
.search-submit button:hover {
    transform: scale(1.05);
}

.search-submit button span:last-child {
    display: none; /* Hide 'Search' text on desktop, show only icon */
}

/* Results Section */
.bab-search-results-container {
    padding: 20px 0;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.results-header h2 {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
}

.bab-search-results-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

/* Boat Card Styling */

/* Boat Card */
.boat-card {
  position: relative;
  cursor: pointer;
  margin-bottom: 28px;
}

.boat-card-image-wrapper {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  aspect-ratio: 201 / 195;
  background: #000;
}

.boat-card-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 20px;
  transition: transform 0.3s ease;
}

.boat-card:hover .boat-card-image-wrapper img {
  transform: scale(1.04);
}

/* Carousel dots overlay */
.carousel-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 5px;
  align-items: center;
}

.carousel-dots .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #d5d2d2;
}

.carousel-dots .dot.active {
  background: var(--white);
}

/* Prev/Next arrows overlay */
.card-nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: var(--white);
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  cursor: pointer;
  opacity: 1;
  color: #000;
  box-shadow: 0px 4px 13px rgba(0, 0, 0, 0.15);
}

.card-nav-arrow.prev {
  left: 8px;
}

.card-nav-arrow.next {
  right: 8px;
}
.search .search-submit {
    background: none;
}
.boat-card-info {
  padding: 8px 2px 0;
}

.boat-name {
  font-size: 15px;
  font-weight: 700;
  color: #000;
  margin-bottom: 2px;
}

.boat-subtitle {
  font-size: 14px;
  font-weight: 400;
  color: var(--muted-color);
  margin-bottom: 2px;
}

.boat-price {
  font-size: 14px;
  font-weight: 400;
  color: var(--muted-color);
}

.price-underline {
  font-weight: 700;
  color: var(--dark-color);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.boat-card:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}


/* Pagination */
.bab-search-pagination {
    /* margin-top: 40px;*/
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.bab-search-pagination .pagi-btn {
    padding: 10px 16px;
    background: #fff;
    cursor: pointer;
    border-radius: 50%; /* Circle buttons */
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
    color: var(--bab-text);
}

.bab-search-pagination .pagi-btn:hover:not(.disabled):not(.active) {
    background: #f7f7f7;
    border-color: var(--bab-text);
}

.bab-search-pagination .pagi-btn.active {
    background: #3e7cff;
    color: #fff;
    border-color: #3e7cff;
}

.bab-search-pagination .pagi-btn.disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.bab-search-pagination .pagi-dots {
    color: var(--bab-muted);
}

#bab-search-where:focus, #bab-search-when:focus, #bab-search-who:focus, #bab-search-time:focus, #bab-search-duration:focus {
    border: none;
    width: 70px;
    height:15px;
}
.home .search-field #bab-search-where:focus, .home .search-field #bab-search-when:focus, .home .search-field #bab-search-who:focus, .home .search-field bab-search-time:focus, .home .search-field #bab-search-duration:focus {
    height: 25px;
    width: 100%;
}

.pages-header .search-field.when label {
	width: 63px;
    z-index: 10000;
    position: relative;
}

.home .search-field.when label {
	width: 100%;
    z-index: 10000;
    position: relative;
}

/* Mobile Responsive */
@media (max-width: 1200px) {
    .bab-search-results-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {

    #boat-filter {
        cursor: pointer;
        background: none;
        border: none;
        border-radius: unset;
        box-shadow: none;
    }
    .desktop-search-wrapper {
        display: none !important;
    }
    
    .mobile-search-wrapper {
        display: block !important;
    }

    .bab-search-results-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columns on tablets */
    }
}

@media (min-width: 769px) {
    .desktop-search-wrapper {
        display: block !important;
    }
    
    .mobile-search-wrapper {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .bab-search-form {
        flex-direction: column;
        border-radius: 12px;
        padding: 16px;
    }
    
    .bab-search-results-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columns on tablets */
    }

    .search-field {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--bab-border);
        padding: 12px 0;
    }

    .search-submit {
        width: 100%;
        padding: 16px 0 0;
    }

    .search-submit button {
        width: 100%;
        border-radius: 8px;
    }

    .search-submit button span:last-child {
        display: inline;
        margin-left: 8px;
    }
}

@media (max-width: 480px) {
    .bab-search-results-grid {
        grid-template-columns: 1fr; /* 1 column on phones */
    }
}

/* Loading Indicator */
.bab-loader-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.7);
    display: none; /* Hidden by default */
    align-items: center;
    justify-content: center;
    z-index: 100;
    border-radius: var(--bab-radius-item);
    backdrop-filter: blur(2px);
    transition: opacity 0.3s ease;
}

.bab-loader-container.active {
    display: flex;
}

.bab-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--bab-primary);
    border-radius: 50%;
    animation: bab-spin 1s linear infinite;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

@keyframes bab-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.listing-results {
    position: relative; /* Context for loader */
    min-height: 400px;
}




/* NEW CSS */
.search-field {
    position: relative;
}
.custom-dd {
    position: absolute;
    top: calc(100% - 13px);
    left: 0;
    display: none;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 45px rgba(0,0,0,0.15);
    z-index: 9999;
	width: max-content;
    min-width: 200px;   /* 🔥 FIX WIDTH */
    max-height: 260px;  /* 🔥 FIX HEIGHT */
    overflow: hidden;
	font-size: 14px;
}

.home .custom-dd {
	top: calc(100% + 12px);
}

/* list */
.custom-dd ul {
    margin: 0;
    padding: 5px 0;
    list-style: none;
    max-height: 260px;
    overflow-y: auto;
	min-width: 200px;
}

.custom-dd li {
    padding: 10px 15px;
    cursor: pointer;
}

.custom-dd li:hover {
    background: #f5f5f5;
}

/* dual (time + duration) */
.dual-wrap {
    display: flex;
    gap: 10px;
    padding: 10px;
}

.time-hours, .dur-hours {
    width: 90px;
    max-height: 200px;
    overflow-y: auto;
}

.time-mins, .dur-mins {
    width: 80px;
}

.time-hours div,
.time-mins div,
.dur-hours div,
.dur-mins div {
    padding: 8px;
    cursor: pointer;
}

.active-col {
    background: #007BFF;
    color: #fff;
    border-radius: 6px;
}

.pages-header .search-field { overflow:visible !important; }

/* ===== REMOVE ALL NATIVE INPUT UI ===== */

/* WHERE (datalist arrow remove) */
#bab-search-where {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

/* WHO (number arrows remove) */
#bab-search-who::-webkit-outer-spin-button,
#bab-search-who::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
#bab-search-who {
    -moz-appearance: textfield;
}

/* DURATION (select arrow remove) */
#bab-search-duration {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: transparent;
}

/* REMOVE INPUT CARET / VISUAL BOX */
.search-field input,
.search-field select {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    caret-color: transparent; /* 🔥 hides blinking cursor */
}

/* OPTIONAL: hide completely but keep value */
.search-field input[type="text"],
.search-field input[type="number"],
.search-field select {
    pointer-events: none; /* 🔥 prevents native UI trigger */
}

.bab-search-form {
    align-items: center;
}

.search-field {
    height: auto;
    overflow: visible !important; /* 🔥 important */
}

.where-dd .active-col:hover, .who-dd .active-col:hover {
    color: #000;
}

.search-field input, .search-field select, .search-field datalist {
	font-size: 10px;
}

.home .search-field input, .home .search-field select, .home .search-field datalist {
	font-size: 14px;
}
input[list]::-webkit-calendar-picker-indicator {
  display: none !important;
  opacity: 0;
  pointer-events: none;
}
 
/* Remove default appearance */
input[list] {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: textfield;
}
 
input[list]::-ms-expand {
  display: none;
}
#bab-search-when {
    pointer-events: auto !important;
}