.loader {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    animation: spin 1s linear infinite;
    margin-left: 10px;
    display: inline-block;
    vertical-align: middle;
}

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

.search-result {
    margin: 10px 0;
    padding: 15px;
    border-radius: 5px;
}

.no-result {
    text-align: center;
    padding: 20px;
    color: var(--blue);
}

/* Clear search button */
.search-area {
    position: relative;
}

.clear-search {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
    font-weight: 300;
    color: #999;
    cursor: pointer;
    display: none;
    width: 24px;
    height: 24px;
    line-height: 22px;
    text-align: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}



.clear-search.visible {
    display: block;
}

.search-area input {
    padding-right: 40px;
}  

/* Smart Location Search Styles */
.location-search-container {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    cursor: pointer;
    border-radius: 5px;
    transition: box-shadow 0.2s ease;
}

#location-search-input,
#location-search-input-hero {
    width: 100%;
    padding: 10px 40px 10px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    background-color: white;
    transition: all 0.3s ease;
    cursor: text;
    /* text-transform: uppercase; */
}

#location-search-input:focus,
#location-search-input-hero:focus {
    border-color: var(--blue);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

#location-search-input.postcode-detected,
#location-search-input-hero.postcode-detected {
    border-color: #28a745;
    background-color: #f0fff4;
}

#location-search-input.county-detected,
#location-search-input-hero.county-detected {
    border-color: var(--blue);
    background-color: #f0f9ff;
}

#location-search-input.postcode-invalid,
#location-search-input-hero.postcode-invalid {
    border-color: #dc3545;
    background-color: #fff5f5;
}

.location-type-indicator {
    position: absolute;
    font-size: 11px;
    color: #666;
    background: white;
    border-radius: 3px;
    font-weight: 500;
    pointer-events: none;
    top: -17px;
    border-radius: 5px 5px 0px 0px;
    left: 30%;
    z-index: 1;
    width: 40%;
    text-align: center;
}
 
.radius-container {
    margin-top: 10px;
    animation: slideDown 0.3s ease;
    position: absolute;
    z-index: 2;
    right: 0px;
    height: 100%;
    display: flex;
    background: transparent;
    top: -10px;
}
 
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.radius-select {
    width: 100%;
    padding: 10px 35px 10px 12px;
    border-radius: 0px 5px 5px 0px;
    font-size: 14px;
    background-color: transparent;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    appearance: none;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.radius-select:focus {
    border-color: var(--blue);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.distance-badge {
    display: inline-block;
    background-color: #e3f2fd;
    color: #1565c0;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    margin-left: 0px;
    margin-bottom: 10px;
}
.page-id-145 .distance-badge {
    margin-bottom: 0px;
    margin-top: 10px;
}
/* Responsive */
@media (max-width: 768px) {
    .radius-container {
        margin-top: 8px;
    }
}
.filtering-area:focus,
.filtering-area:focus-visible,
.location-search-container:focus,
.location-search-container:focus-visible{
    outline: none;
}

.location-dropdown-toggle {
    position: absolute;
    content: '';
    width: 50px;
    height: 50px;
    position: absolute;
    right: 0px;
    background-image: url(/wp-content/themes/rezolva-acum/assets/images/chevrongreen.png);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    pointer-events: none;
    border: unset;
    background-color: transparent;
}

.county-dropdown-toggle:hover {
    /* color: #333; */
}
.county-dropdown-toggle{
    transition: 0.3s;
}
.county-dropdown-toggle.active {
    transform: translateY(-50%) rotate(180deg);
    color: #007cba;
    top: 30px;
    transition: 0.3s;
}

.county-dropdown-toggle svg {
    display: block;
}

#county-search-input:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.1);
}

#county-search-input.detecting {
    background-image: linear-gradient(45deg, #f0f0f0 25%, transparent 25%),
                      linear-gradient(-45deg, #f0f0f0 25%, transparent 25%),
                      linear-gradient(45deg, transparent 75%, #f0f0f0 75%),
                      linear-gradient(-45deg, transparent 75%, #f0f0f0 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    animation: barberpole 1s linear infinite;
}

@keyframes barberpole {
    0% { background-position: 0 0, 0 10px, 10px -10px, -10px 0px; }
    100% { background-position: 20px 20px, 20px 30px, 30px 10px, 10px 20px; }
}

.county-suggestions,
.county-dropdown-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--blue);
    color: #fff;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 5px 5px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.suggestion-group,
.dropdown-group {
    border-bottom: 1px solid #f0f0f0;
}

.suggestion-group:last-child,
.dropdown-group:last-child {
    border-bottom: none;
}

.group-header,
.dropdown-group-header {
    padding: 8px 12px;
    background-color: #f8f9fa;
    font-weight: 600;
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #e9ecef;
}

.suggestion-item,
.dropdown-option {
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f5f5f5;
    transition: background-color 0.2s ease;
    font-size: 14px;
}

.suggestion-item:hover,
.suggestion-item.selected,
.dropdown-option:hover,
.dropdown-option.selected {
    background-color: #007cba;
    color: white;
}

.suggestion-item:last-child,
.dropdown-option:last-child {
    border-bottom: none;
}

/* Special styling for "All counties" option */
.dropdown-option[data-value="none"] {
    font-weight: 600;
    background-color: var(--ashGray);
    color: #fff;
}

.dropdown-option[data-value="none"]:hover {
    background-color: #007cba;
    color: white;
}

/* Responsive adjustments */

@media screen and (max-width: 1000px){
    .radius-select{
        border-radius: 0px 21px 0px 0px;
    }
    .radius-container{
        margin-top: 0px;
        top: unset;
    }
}
@media (max-width: 768px) {
    .county-suggestions,
    .county-dropdown-list {
        max-height: 200px;
    }

    #county-search-input {
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .county-dropdown-toggle {
        right: 6px;
        padding: 6px;
    }
}

/* Hide inline results ONLY on search-results page (page ID 145) */
body.page-id-145 #ajax-search-results,
body.page-id-145 #see-more-results {
    display: none !important;
}

/* Hero-specific styles */
#ajax-search-container-hero {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

#ajax-search-input-hero {
    width: 100%;
    padding: 15px 50px 15px 20px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

#ajax-search-input-hero:focus {
    border-color: var(--blue);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

#clear-search-hero {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
}

#clear-search-hero:hover {
    opacity: 1;
}

#clear-search-hero::before,
#clear-search-hero::after {
    content: '';
    position: absolute;
    width: 2px;
    height: 16px;
    background: #666;
    top: 50%;
    left: 50%;
}

#clear-search-hero::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

#clear-search-hero::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

#ajax-search-results-hero {
    margin-top: 20px;
}

#see-more-results-hero {
    display: block;
    width: 100%;
    padding: 15px 30px;
    margin-top: 20px;
    background: var(--blue);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

#see-more-results-hero:hover {
    background: var(--blue-dark, #005a8e);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

#see-more-results-hero:active {
    transform: translateY(0);
}

#county-suggestions-hero,
#county-dropdown-list-hero {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--blue);
    color: #fff;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 5px 5px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#location-dropdown-toggle-hero {
    position: absolute;
    content: '';
    width: 50px;
    height: 50px;
    right: 0px;
    background-image: url(/wp-content/themes/rezolva-acum/assets/images/chevrongreen.png);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    pointer-events: none;
    border: unset;
    background-color: transparent;
}

#location-type-indicator-hero {
    position: absolute;
    font-size: 11px;
    color: #666;
    background: white;
    border-radius: 3px;
    font-weight: 500;
    pointer-events: none;
    top: -17px;
    border-radius: 5px 5px 0px 0px;
    left: 30%;
    z-index: 1;
    width: 40%;
    text-align: center;
}

#radius-container-hero {
    margin-top: 10px;
    animation: slideDown 0.3s ease;
    position: absolute;
    z-index: 2;
    right: 0px;
    height: 100%;
    display: flex;
    background: transparent;
    top: -10px;
}

#radius-select-hero {
    width: 100%;
    padding: 10px 35px 10px 12px;
    border-radius: 0px 5px 5px 0px;
    font-size: 14px;
    background-color: transparent;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    appearance: none;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

#radius-select-hero:focus {
    border-color: var(--blue);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}



