/* ========================================
   🎨 SEARCH RESULTS PAGE - MODERN DESIGN
   ======================================== */

body {
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
  background: #ffffff;
  min-height: 100vh;
  overflow-x: hidden;
}

header {
  background: transparent !important;
  border-bottom: none;
  box-shadow: none;
}

main {
  display: block !important;
  grid-template-columns: none !important;
  max-width: 1400px !important;
  width: 90vw !important;
  margin: 0 auto !important;
}


/* Search form container */
#change-search-form {
  max-width: 900px;
  margin: 0 auto 40px auto;
  overflow: visible;
  position: relative;
  z-index: 100;
}

#change-search-form .inline-form {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  background: #ffffff;
  padding: 40px;
  border-radius: 24px;
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.12),
    0 0 0 1px rgba(247, 226, 38, 0.2);
  border: 2px solid rgba(247, 226, 38, 0.3);
  overflow: visible;
  position: relative;
}

/* Custom dropdown positioning in change-search form */
#change-search-form .custom-dropdown {
  position: relative;
  z-index: 200;
  flex: 1 1 200px;
}

#change-search-form .dropdown-cities,
#change-search-form .dropdown-ages,
#change-search-form .dropdown-kids-count,
#change-search-form .dropdown-durations {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 2000;
  max-height: 300px;
  width: 100%;
  margin-top: 4px;
}

#change-search-form input {
  padding: 18px 24px;
  border: 2px solid rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  font-size: 17px;
  font-weight: 500;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: #fafafa;
}

#change-search-form input:focus-visible {
  outline: none;
  border-color: #F7E226;
  box-shadow: 0 0 0 5px rgba(247, 226, 38, 0.2), 0 4px 16px rgba(0, 0, 0, 0.08);
  background: #ffffff;
}

/* Clear button for optional fields — override global button styles */
button.field-clear-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  min-width: 20px;
  max-width: 20px;
  min-height: 20px;
  max-height: 20px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.1);
  color: #555;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  box-shadow: none;
  letter-spacing: 0;
  flex: 0 0 auto;
  z-index: 10;
  transition: background 0.2s ease;
}

button.field-clear-btn:hover {
  background: rgba(0, 0, 0, 0.2);
  color: #333;
}

#change-search-form .custom-dropdown input {
  padding-right: 34px;
}

/* ===== Search Page Layout Classes ===== */
.search-page-header { text-align: center; padding: 24px 16px 0; }
.search-page-title { font-family: 'Nunito', sans-serif; font-weight: 800; font-size: 28px; color: #333; margin: 0 0 8px; }
.search-page-intro { color: #666; font-size: 15px; margin: 0 0 8px; }
.search-map-hint { color: #666; font-size: 0.9rem; margin-top: 10px; }
.search-map-container { height: 500px; border-radius: 8px; border: 2px solid #ddd; }
.search-filter-card { margin-top: 30px; background: white; padding: 20px; border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.search-section-heading { margin-bottom: 15px; color: #2c3e50; display: flex; align-items: center; gap: 8px; font-size: 1.17em; }
.filter-icon { color: #F7E226; }
.distance-filter-row { display: flex; gap: 15px; flex-wrap: wrap; align-items: flex-end; }
.distance-label { display: block; margin-bottom: 5px; font-weight: 600; color: #555; }
.distance-input-wrapper { flex: 1; min-width: 250px; }
.distance-slider-wrapper { flex: 1; min-width: 200px; }
.distance-slider-wrapper input[type="range"],
.advanced-filters-grid input[type="range"] { width: 100%; }
.distance-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.distance-actions-btn { white-space: nowrap; }
.location-btn { white-space: nowrap; display: flex; align-items: center; gap: 5px; }
.filter-input { width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 6px; font-size: 14px; }
.filter-value-highlight { color: #F7E226; }
.filter-checkbox { width: 20px; height: 20px; accent-color: #F7E226; }
.filter-checkbox-label { display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 10px; border: 1px solid #ddd; border-radius: 8px; }
.filter-checkbox-title { font-weight: 600; color: #555; }
.filter-checkbox-desc { font-size: 0.85rem; color: #888; }
.filter-status { margin-top: 15px; padding: 10px; border-radius: 6px; }
.filter-actions { margin-top: 20px; display: flex; gap: 10px; }
.filter-actions .btn-primary { flex: 1; }
.advanced-filters-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.slider-range-labels { display: flex; justify-content: space-between; font-size: 0.85rem; color: #888; margin-top: 4px; }
#search-results { margin-top: 30px; }

/* ===== Search Results Page Styles ===== */

/* Loading state */
.loading {
    padding: 16px;
    text-align: center;
    color: #7f8c8d;
    font-size: 16px;
}

/* ===== Club Card - OVERRIDE general styles ===== */
#search-results .club-card {
    /* Reset conflicting styles from styles.css */
    width: 100% !important;
    height: auto !important;
    max-width: 1200px !important;
    display: grid !important;
    grid-template-columns: 1fr 3fr !important;
    flex-direction: initial !important;
    
    /* New styles */
    gap: 20px;
    align-items: start;
    padding: 20px;
    border: 1px solid #e9ecef;
    border-radius: 16px;
    margin: 0 auto 24px auto;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: box-shadow 0.3s ease;
    overflow: visible;
}

#search-results .club-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    transform: none !important; /* prevent scale from styles.css */
}

/* ===== Club Image (1/4 width) ===== */
#search-results .club-img {
    width: 100%;
    height: auto;
    overflow: hidden;
}

#search-results .club-img img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 12px;
    background: #f0f0f0;
    transition: none !important;
    transform: none !important;
}

#search-results .club-img img:hover {
    transform: none !important;
    scale: 1 !important;
}

/* Skeleton loader for images */
#search-results .club-img.img-loading-container {
    height: 250px;
    border-radius: 12px;
    position: relative;
}

#search-results .club-img.img-loading-container.loaded::before {
    display: none;
}

/* ===== Club Content Wrapper ===== */
#search-results .club-content-wrapper {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

/* Club info section */
#search-results .club-info {
    font-size: 15px;
    color: #2c3e50;
}

#search-results .club-info .club-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 8px 0;
    transition: color 0.2s ease;
}

#search-results .club-info .club-name:hover {
    color: #0369a1;
    text-decoration: underline;
}

#search-results .club-info .club-address {
    color: #555;
    margin: 6px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

#search-results .club-info .club-address i {
    color: #F7E226;
}

#search-results .club-info .club-city,
#search-results .club-info .club-area,
#search-results .club-info .club-price {
    margin: 4px 0;
    color: #666;
}

#search-results .club-info .club-price {
    font-weight: 600;
    color: #2c3e50;
    font-size: 1.1rem;
}

/* ===== Slots Section ===== */
#search-results .club-slots {
    overflow: visible;
    width: 100%;
}

#search-results .slots-wrapper {
    max-height: 280px;
    overflow-y: auto;
    padding-right: 8px;
    margin-bottom: 12px;
}

#search-results .slots-wrapper::-webkit-scrollbar {
    width: 6px;
}

#search-results .slots-wrapper::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

#search-results .slots-wrapper::-webkit-scrollbar-thumb {
    background: #F7E226;
    border-radius: 10px;
}

#search-results .slots-wrapper::-webkit-scrollbar-thumb:hover {
    background: #e0c71f;
}


/* Slots columns layout - one column per duration */
#search-results .slots-columns {
    display: flex;
    gap: 12px;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

#search-results .slots-column {
    flex: 1 1 0;
    min-width: 90px;
    overflow: hidden;
}

#search-results .slots-column-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 2px solid #F7E226;
}

#search-results .slots-dur-label {
    font-weight: 700;
    font-size: 0.85rem;
    color: #333;
}

#search-results .slots-dur-count {
    font-size: 0.75rem;
    color: #888;
}

#search-results .slots-more {
    text-align: center;
    font-size: 0.75rem;
    color: #888;
    margin-top: 4px;
    font-style: italic;
}

#search-results .slots-column-more {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f9f9f9;
    border: 1px dashed #ddd;
    border-radius: 8px;
    padding: 8px 6px;
    min-width: 70px;
    max-width: 100px;
    flex-shrink: 0;
}

#search-results .slots-more-hint {
    font-size: 0.7rem;
    color: #aaa;
    text-align: center;
    margin-top: 4px;
}

/* Slots grid inside each column */
#search-results .slots-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px;
    width: 100%;
}

#search-results .slot-btn {
    padding: 10px 12px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.9rem;
    text-align: center;
    display: block;
    width: 100%;
}

#search-results .slot-btn:hover {
    background: #F7E226;
    border-color: #F7E226;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(247, 226, 38, 0.3);
}

#search-results .slot-none {
    color: #999;
    font-style: italic;
    padding: 8px;
    text-align: center;
    grid-column: 1 / -1;
}

#search-results .slot-error {
    color: #e74c3c;
    font-size: 0.85rem;
    padding: 8px;
    grid-column: 1 / -1;
}

/* View details button */
#search-results .view-details-btn {
    padding: 12px;
    width: 100%;
    background: #2c3e50;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    box-shadow: none !important;
}

#search-results .view-details-btn:hover {
    background: #34495e;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15) !important;
}

/* ===== Responsive Design ===== */

/* Tablets and small laptops */
@media (max-width: 968px) {
    main {
        width: 95vw !important;
    }

    #change-search-form .inline-form {
        padding: 30px;
        gap: 16px;
    }

    #search-results .club-card {
        gap: 16px !important;
        padding: 16px;
    }

    #search-results .club-img img {
        height: 200px;
    }

    #search-results .slots-grid {
        grid-template-columns: repeat(auto-fill, minmax(115px, 1fr)) !important;
    }

    #search-results .slot-btn {
        padding: 10px 8px;
        font-size: 0.85rem;
        white-space: nowrap;
        overflow: visible;
    }
}

/* Tablet - dropdown fixes */
@media (min-width: 769px) and (max-width: 1024px) {
    /* Form container must allow overflow */
    #change-search-form {
        overflow: visible !important;
        z-index: 100;
    }

    #change-search-form .custom-dropdown {
        position: relative;
        z-index: 200;
        min-width: 180px;
    }

    #change-search-form .dropdown-cities,
    #change-search-form .dropdown-ages,
    #change-search-form .dropdown-kids-count,
    #change-search-form .dropdown-durations {
        position: absolute;
        top: 100%;
        left: 0;
        right: auto;
        width: 100%;
        min-width: 200px;
        z-index: 2000;
        max-height: 250px;
        margin-top: 4px;
    }

    /* Ensure dropdowns are visible above other content */
    #change-search-form .inline-form {
        overflow: visible !important;
        position: relative;
        z-index: 50;
    }

    /* Fix form layout on tablet */
    #change-search-form .inline-form {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: flex-start;
    }

    /* City dropdown gets priority when open */
    #change-search-form .custom-dropdown:focus-within {
        z-index: 300;
    }
}

/* Mobile devices - landscape and portrait */
@media (max-width: 768px) {
    #change-search-form .inline-form {
        padding: 24px;
        gap: 14px;
        overflow: visible !important;
    }

    #change-search-form input {
        padding: 14px 18px;
        font-size: 16px;
    }

    /* Mobile dropdown fixes */
    #change-search-form {
        overflow: visible !important;
    }

    #change-search-form .custom-dropdown {
        position: relative;
        z-index: 200;
        width: 100%;
    }

    #change-search-form .dropdown-cities,
    #change-search-form .dropdown-ages,
    #change-search-form .dropdown-kids-count,
    #change-search-form .dropdown-durations {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        z-index: 2000;
        max-height: 200px;
        margin-top: 4px;
    }

    #search-results .club-card {
        grid-template-columns: 1fr !important;
    }

    /* Map section mobile */
    #map-section {
        padding: 15px !important;
        margin-top: 20px !important;
    }

    #search-map {
        height: 350px !important;
    }
}

/* Mobile devices - portrait */
@media (max-width: 640px) {
    main {
        width: 96vw !important;
    }

    #change-search-form .inline-form {
        padding: 20px;
        gap: 12px;
        overflow: visible !important;
    }

    #change-search-form input {
        padding: 12px 16px;
        font-size: 15px;
    }

    /* Dropdown max-height reduced on small screens */
    #change-search-form .dropdown-cities,
    #change-search-form .dropdown-ages,
    #change-search-form .dropdown-kids-count,
    #change-search-form .dropdown-durations {
        max-height: 180px;
    }

    #search-results .club-card {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
        padding: 14px;
        border-radius: 12px;
    }

    #search-results .club-img img {
        height: 180px;
    }

    #search-results .club-info .club-name {
        font-size: 1.2rem;
    }

    #search-results .club-info {
        font-size: 14px;
    }

    #search-results .slots-wrapper {
        max-height: 240px;
    }

    #search-results .slots-columns {
        gap: 6px;
        padding-bottom: 4px;
    }

    #search-results .slots-column {
        min-width: 80px;
    }

    #search-results .slots-column-more {
        min-width: 60px;
        padding: 6px 4px;
    }

    #search-results .slots-more-hint {
        font-size: 0.6rem;
    }

    #search-results .slots-grid {
        gap: 4px;
    }

    #search-results .slot-btn {
        padding: 8px 4px;
        font-size: 0.8rem;
        line-height: 1.3;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    #search-results .slots-dur-label {
        font-size: 0.75rem;
        white-space: nowrap;
    }

    #search-results .slots-dur-count {
        font-size: 0.65rem;
    }

    #search-results .club-actions {
        flex-direction: column;
        gap: 10px;
    }

    #search-results .view-details-btn,
    #search-results .booking-btn {
        width: 100%;
        min-width: auto;
    }

    /* Map section mobile */
    #search-map {
        height: 300px !important;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    #change-search-form .inline-form {
        padding: 16px;
        gap: 10px;
        overflow: visible !important;
    }

    #change-search-form input {
        padding: 10px 14px;
        font-size: 14px;
    }

    /* Dropdown max-height reduced on very small screens */
    #change-search-form .dropdown-cities,
    #change-search-form .dropdown-ages,
    #change-search-form .dropdown-kids-count,
    #change-search-form .dropdown-durations {
        max-height: 150px;
    }

    #search-results .club-card {
        padding: 12px;
    }

    #search-results .club-img img {
        height: 160px;
    }

    #search-results .club-info .club-name {
        font-size: 1.1rem;
    }

    #search-results .slots-columns {
        gap: 4px;
    }

    #search-results .slots-column {
        min-width: 0;
        flex: 1 1 0;
        overflow: hidden;
    }

    #search-results .slots-column-more {
        min-width: 0;
        max-width: none;
        flex: 0 1 auto;
        padding: 4px 3px;
    }

    #search-results .slots-grid {
        gap: 4px;
    }

    #search-results .slot-btn {
        padding: 6px 2px;
        font-size: 0.72rem;
        line-height: 1.3;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    #search-results .slots-dur-label {
        font-size: 0.68rem;
        white-space: nowrap;
    }

    #search-results .slots-dur-count {
        font-size: 0.58rem;
    }

    #search-results .view-details-btn,
    #search-results .booking-btn {
        padding: 10px;
        font-size: 0.9rem;
    }

    #map-section {
        padding: 12px !important;
    }

    #search-map {
        height: 250px !important;
    }
}

/* Very small mobile devices */
@media (max-width: 360px) {
    main {
        width: 98vw !important;
    }

    #change-search-form .inline-form {
        padding: 14px;
        gap: 8px;
        border-radius: 16px;
    }

    #change-search-form input {
        padding: 10px 12px;
        font-size: 13px;
        border-radius: 10px;
    }

    #search-results .club-card {
        padding: 10px;
        border-radius: 10px;
        gap: 12px !important;
    }

    #search-results .club-img img {
        height: 140px;
        border-radius: 8px;
    }

    #search-results .club-info .club-name {
        font-size: 1rem;
    }

    #search-results .club-info {
        font-size: 13px;
    }

    #search-results .slots-wrapper {
        max-height: 160px;
    }

    #search-results .slots-grid {
        grid-template-columns: repeat(auto-fill, minmax(95px, 1fr)) !important;
        gap: 4px;
    }

    #search-results .slot-btn {
        padding: 6px 2px;
        font-size: 0.7rem;
        line-height: 1.3;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        border-radius: 6px;
    }

    #search-results .view-details-btn,
    #search-results .booking-btn {
        padding: 9px;
        font-size: 0.85rem;
        border-radius: 6px;
        min-width: auto;
    }

    #map-section {
        padding: 10px !important;
        border-radius: 10px;
    }

    #search-map {
        height: 220px !important;
        border-radius: 8px;
    }
}/* === Slot Selection Styles === */

/* Selected slot state */
#search-results .slot-btn-selected {
    background: #F7E226 !important;
    border-color: #F7E226 !important;
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(247, 226, 38, 0.4) !important;
}

/* Buttons container */
#search-results .club-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    flex-wrap: wrap;
}

/* Details button (always visible) */
#search-results .view-details-btn {
    flex: 1;
    min-width: 200px;
    padding: 12px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    color: #2c3e50;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

#search-results .view-details-btn:hover {
    background: #e9ecef;
    border-color: #dee2e6;
    transform: translateY(-1px);
}

/* Booking button (visible only when slot selected) */
#search-results .booking-btn {
    flex: 1;
    min-width: 200px;
    padding: 12px;
    background: #F7E226;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    color: #2c3e50;
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(247, 226, 38, 0.3);
}

#search-results .booking-btn:hover {
    background: #e4dfb8;
;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(247, 226, 38, 0.4);
}

.slot-btn {
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 6px 10px;
  background: #fff;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.slot-btn.slot-btn-selected {
  background: #F7E226; /* жълто */
  border-color: #F7E226;
  color: #222;
  box-shadow: 0 0 0 2px rgba(247,226,38,.25) inset;
}
.slot-btn.slot-btn-selected:hover,
.slot-btn.slot-btn-selected:focus {
  background: #F7E226;
  border-color: #F7E226;
  color: #222;
}
.slot-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0,0,0,.08), 0 0 0 5px rgba(247,226,38,.45);
}/* вече имаш това — остави си го */
.slot-btn.slot-btn-selected {
  background: #F7E226;   /* избран = наситено жълто */
  border-color: #F7E226;
  color: #222;
}

/* ========================================
   Duration Filter Dropdown (multi-select)
   ======================================== */

/* Dropdown container positioning */
#change-search-form .dropdown-durations {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 2000;
  max-height: 300px;
  overflow-y: auto;
  width: 100%;
  margin-top: 4px;
  display: none;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  padding: 6px 0;
}

/* Each duration item row */
.dropdown-durations .dur-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  color: #333;
  transition: background 0.15s ease;
  user-select: none;
}

.dropdown-durations .dur-item:hover {
  background: rgba(247, 226, 38, 0.12);
}

/* Hide native checkbox, use custom tick */
.dropdown-durations .dur-checkbox {
  display: none;
}

/* Custom checkbox square */
.dropdown-durations .dur-item::before {
  content: '';
  width: 20px;
  height: 20px;
  min-width: 20px;
  border: 2px solid #ccc;
  border-radius: 5px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  line-height: 1;
}

/* Checked state — yellow with tick */
.dropdown-durations .dur-item:has(.dur-checkbox:checked)::before {
  content: '\2713';
  background: #F7E226;
  border-color: #F7E226;
  color: #2c3e50;
  font-weight: 700;
}

/* Highlight checked rows */
.dropdown-durations .dur-item:has(.dur-checkbox:checked) {
  background: rgba(247, 226, 38, 0.08);
  font-weight: 600;
}

/* Duration input field — readonly cursor */
#duration-field {
  cursor: pointer;
}

#duration-field::placeholder {
  color: #A9A9A9;
}

/* ========================================
   Search Toolbar (icon buttons row)
   ======================================== */
.search-toolbar {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin: -20px auto 24px auto;
  max-width: 900px;
}

.toolbar-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid #e9ecef;
  background: #fff;
  color: #2c3e50;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.toolbar-btn:hover {
  background: #F7E226;
  border-color: #F7E226;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(247,226,38,0.3);
}

.toolbar-btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.toolbar-btn:disabled {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}

/* ========================================
   Address Autocomplete Dropdown
   ======================================== */
.address-autocomplete-wrap {
  position: relative;
}
.address-autocomplete-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #ddd;
  border-top: none;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
  z-index: 500;
  max-height: 220px;
  overflow-y: auto;
  list-style: none;
  margin: 0;
  padding: 0;
}
.address-autocomplete-list li {
  padding: 10px 12px;
  cursor: pointer;
  font-size: 13px;
  color: #333;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.address-autocomplete-list li:last-child { border-bottom: none; }
.address-autocomplete-list li:hover,
.address-autocomplete-list li.active {
  background: #f0f7ff;
}
.address-autocomplete-list li i {
  color: #999;
  font-size: 12px;
  flex-shrink: 0;
}
.address-autocomplete-spinner {
  padding: 12px;
  text-align: center;
  color: #999;
  font-size: 13px;
}

/* ========================================
   Search Modal Overlay + Dialog
   ======================================== */
.search-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 1000000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: smOverlayIn 0.2s ease;
}

@keyframes smOverlayIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.search-modal {
  background: #fff;
  border-radius: 16px;
  width: 90vw;
  max-width: 900px;
  max-height: 85vh;
  overflow-y: auto;
  padding: 28px 24px 24px;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  animation: smSlideIn 0.25s ease;
}

@keyframes smSlideIn {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.search-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.search-modal-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #2c3e50;
  margin: 0;
}

.search-modal-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: #f0f0f0;
  color: #555;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.search-modal-close:hover {
  background: #e0e0e0;
  color: #222;
}

/* When a section is inside the modal, make sure it displays properly */
.search-modal > #map-section,
.search-modal > #distance-filter-section,
.search-modal > #advanced-filters-section {
  display: block !important;
  margin-top: 0 !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
}

/* Ensure map renders at good size inside modal */
.search-modal #search-map {
  height: 450px !important;
}

@media (max-width: 640px) {
  .search-modal {
    width: 96vw;
    max-height: 90vh;
    padding: 20px 16px 16px;
    border-radius: 12px;
  }

  .search-modal #search-map {
    height: 300px !important;
  }

  .toolbar-btn {
    width: 42px;
    height: 42px;
    font-size: 16px;
  }
}

