/* Hero Search Redesign */
.hero-search-container {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 32px;
    padding: 2rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
}

.search-pills-container {
    margin-bottom: 1.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

.search-pills-container::-webkit-scrollbar {
    display: none;
}

.search-pills-wrapper {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

.search-pill {
    cursor: pointer;
    padding: 0.6rem 1.2rem;
    border-radius: 100px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: var(--text-dark);
    font-size: 0.95rem;
    user-select: none;
}

.search-pill:hover {
    background: #fff;
    border-color: var(--primary-green);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.15);
}

.search-pill.active {
    background: var(--primary-green);
    color: white;
    border-color: var(--primary-green);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.search-pill-icon {
    font-size: 1.1em;
}

.compact-search-bar {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 100px;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    position: relative;
}

.search-divider {
    width: 1px;
    height: 32px;
    background: #e0e0e0;
    margin: 0 0.5rem;
}

.search-field-group {
    flex: 1;
    padding: 0.5rem 1rem;
    position: relative;
    transition: background 0.2s;
    border-radius: 32px;
}

.search-field-group:hover {
    background: #f8f9fa;
}

.search-field-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.1rem;
    letter-spacing: 0.5px;
}

.search-field-input {
    border: none;
    background: transparent;
    width: 100%;
    padding: 0;
    font-size: 0.95rem;
    color: #555;
    font-weight: 500;
    outline: none;
    text-overflow: ellipsis;
}

.search-field-input::placeholder {
    color: #aaa;
}

.search-field-input:focus {
    outline: none;
}

.search-btn-floating {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: -webkit-linear-gradient(45deg, var(--primary-green), var(--dark-green));
    background: linear-gradient(45deg, var(--primary-green), var(--dark-green));
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    flex-shrink: 0;
    margin-left: 0.5rem;
    box-shadow: 0 4px 15px rgba(46, 125, 50, 0.3);
}

.search-btn-floating:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(46, 125, 50, 0.4);
}

/* Custom Select for Pet Type */
.custom-select-wrapper {
    position: relative;
    cursor: pointer;
}

.custom-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.95rem;
    color: #555;
    font-weight: 500;
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
    .compact-search-bar {
        flex-direction: column;
        border-radius: 24px;
        padding: 1rem;
        gap: 0.5rem;
        align-items: stretch;
    }

    .search-divider {
        display: none;
    }

    .search-field-group {
        border-bottom: 1px solid #eee;
        border-radius: 12px;
        padding: 0.75rem;
    }

    .search-field-group:last-of-type {
        border-bottom: none;
    }

    .search-btn-floating {
        width: 100%;
        height: 48px;
        border-radius: 12px;
        margin-left: 0;
        margin-top: 1rem;
    }

    .search-btn-floating span {
        display: inline-block;
        margin-left: 0.5rem;
        font-size: 1rem;
        font-weight: 600;
    }
}

/* Date inputs override */
input[type="date"]::-webkit-calendar-picker-indicator {
    background: transparent;
    bottom: 0;
    color: transparent;
    cursor: pointer;
    height: auto;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    width: auto;
}

/* Location Suggestions Styling */
.search-field-group .dropdown-menu {
    border-radius: 16px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    padding: 0.5rem;
    margin-top: 0.5rem;
    max-height: 400px;
    overflow-y: auto;
}

.location-suggestion-item {
    border: none;
    background: transparent;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    transition: all 0.2s ease;
    width: 100%;
    text-align: left;
    margin-bottom: 0.25rem;
    line-height: 1.4;
}

.location-suggestion-item:last-child {
    margin-bottom: 0;
}

.location-suggestion-item:hover {
    background: rgba(76, 175, 80, 0.08);
    transform: translateX(4px);
}

.location-suggestion-content {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
}

.location-suggestion-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.15), rgba(76, 175, 80, 0.08));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-green);
    font-size: 1rem;
}

.location-suggestion-text {
    flex: 1;
    min-width: 0;
}

.location-suggestion-label {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-dark);
    margin-bottom: 0.2rem;
    line-height: 1.3;
    white-space: normal;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.location-suggestion-subtitle {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 0.25rem;
    line-height: 1.3;
    white-space: normal;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.location-suggestion-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
    font-size: 0.8rem;
    color: #6c757d;
}

.location-suggestion-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    background: #f1f3f5;
    color: #4b5563;
    font-weight: 600;
    line-height: 1.2;
}

.location-suggestion-chip--muted {
    background: #eef2f7;
    color: #6c757d;
    font-weight: 500;
}

/* Fullscreen overlay for location suggestions */
.location-suggestions-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    padding: 1rem;
}

.location-suggestions-overlay.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.location-suggestions-overlay__backdrop {
    position: absolute;
    inset: 0;
    cursor: pointer;
}

.location-suggestions-overlay__panel {
    position: relative;
    width: min(920px, calc(100% - 2rem));
    max-height: 85vh;
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.location-suggestions-overlay__header {
    padding: 1.25rem 1.5rem;
    border-bottom: 2px solid #e9ecef;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-shrink: 0;
}

.location-suggestions-overlay__title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary-green);
    margin: 0;
    flex: 1;
}

.location-suggestions-overlay__term {
    font-size: 0.9rem;
    color: #6c757d;
    font-weight: 500;
    margin-top: 0.25rem;
}

.location-suggestions-overlay__close {
    background: rgba(76, 175, 80, 0.1);
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-green);
    transition: all 0.2s ease;
    cursor: pointer;
    flex-shrink: 0;
}

.location-suggestions-overlay__close:hover,
.location-suggestions-overlay__close:focus {
    background: rgba(76, 175, 80, 0.2);
    transform: scale(1.1);
    outline: none;
}

.location-suggestions-overlay__body {
    padding: 1.25rem 1.75rem 1.75rem 1.75rem;
    overflow-y: auto;
}

/* Grid layout for suggestions */
.location-suggestions-overlay__list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0.75rem;
}

.location-suggestions-overlay__list .location-suggestion-item {
    padding: 1rem 1.25rem;
    border-radius: 16px;
    border: 2px solid #f1f3f5;
    background: #ffffff;
    transition: all 0.25s ease;
    cursor: pointer;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.location-suggestions-overlay__list .location-suggestion-item:hover {
    transform: translateY(-3px);
    border-color: var(--primary-green);
    background: rgba(76, 175, 80, 0.05);
    box-shadow: 0 8px 20px rgba(76, 175, 80, 0.15);
}

.location-suggestions-overlay__list .location-suggestion-item:active {
    transform: translateY(-1px);
}

body.location-suggestions-overlay-open {
    overflow: hidden;
}

/* Scrollbar styling for suggestions dropdown */
.search-field-group .dropdown-menu::-webkit-scrollbar {
    width: 6px;
}

.search-field-group .dropdown-menu::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.search-field-group .dropdown-menu::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 10px;
}

.search-field-group .dropdown-menu::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Scrollbar styling for overlay */
.location-suggestions-overlay__body::-webkit-scrollbar {
    width: 8px;
}

.location-suggestions-overlay__body::-webkit-scrollbar-track {
    background: #f8f9fa;
    border-radius: 10px;
}

.location-suggestions-overlay__body::-webkit-scrollbar-thumb {
    background: rgba(76, 175, 80, 0.3);
    border-radius: 10px;
}

.location-suggestions-overlay__body::-webkit-scrollbar-thumb:hover {
    background: rgba(76, 175, 80, 0.5);
}

/* Responsive adjustments for overlay */
@media (max-width: 768px) {
    .location-suggestions-overlay__panel {
        width: calc(100% - 1rem);
        max-height: 90vh;
        border-radius: 20px;
    }

    .location-suggestions-overlay__header {
        padding: 1.25rem 1.25rem 0.85rem 1.25rem;
    }

    .location-suggestions-overlay__title {
        font-size: 1.1rem;
    }

    .location-suggestions-overlay__body {
        padding: 1rem 1.25rem 1.25rem 1.25rem;
    }

    .location-suggestions-overlay__list {
        grid-template-columns: 1fr;
        gap: 0.6rem;
    }

    .location-suggestions-overlay__list .location-suggestion-item {
        padding: 0.9rem 1rem;
    }
}

@media (min-width: 1200px) {
    .location-suggestions-overlay__list {
        grid-template-columns: repeat(3, 1fr);
    }
}
