/* Alina Branches: location search box, suggestions and the address box. */
.location-search-container {
    max-width: 600px;
    font-family: 'Lato', -apple-system, BlinkMacSystemFont, sans-serif;
    position: relative;
}

.search-input-wrapper input {
    font-size: 18px !important;
}

.search-input-wrapper {
    display: flex;
    gap: 12px;
    background: rgba(255, 255, 255, 1);
    padding: 8px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08),
                0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 1px solid rgba(230, 230, 230, 0.7);
    backdrop-filter: blur(10px);
}

.search-input-wrapper:focus-within {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12),
                0 2px 6px rgba(0, 0, 0, 0.08);
    border-color: rgba(96, 34, 118, 0.2);
    transform: translateY(-1px);
}

.search-input-wrapper input {
    flex: 1;
    padding: 0 20px;
    border: 0 !important;
    border-width: 0 !important;
    border-style: none !important;
    border-color: transparent !important;
    outline: none !important;
    border-radius: 12px;
    font-size: 18px !important;
    height: 55px;
    line-height: 50px;
    color: #1a1a1a;
    background: rgba(245, 245, 247, 0.6);
    transition: all 0.3s ease;
    font-family: 'Lato', -apple-system, BlinkMacSystemFont, sans-serif;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    box-shadow: none !important;
    min-height: 55px;
    display: flex;
    align-items: center;
}

.location-search-container .search-input-wrapper input[type="text"] {
    border: 0 !important;
    border-width: 0 !important;
    outline: none !important;
}

.search-input-wrapper input:focus {
    outline: none !important;
    border: 0 !important;
    border-width: 0 !important;
    box-shadow: none !important;
    background: rgba(245, 245, 247, 0.9);
    color: #000;
}

.search-input-wrapper input::placeholder {
    color: #6b7280;
    font-family: 'Lato', -apple-system, BlinkMacSystemFont, sans-serif;
}

.search-button {
    padding: 14px 28px;
    background: linear-gradient(135deg, #602276 0%, #7B2C94 100%);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    font-size: 18px;
    letter-spacing: 0.3px;
    transition: all 0.3s ease;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(96, 34, 118, 0.2);
    font-family: 'Lato', -apple-system, BlinkMacSystemFont, sans-serif;
}

.search-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.search-button:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #702888 0%, #8D33AB 100%);
    box-shadow: 0 6px 20px rgba(96, 34, 118, 0.3);
}

.search-button:hover::before {
    opacity: 1;
}

.search-button:active {
    transform: translateY(0);
    background: linear-gradient(135deg, #501d63 0%, #602276 100%);
    box-shadow: 0 2px 10px rgba(96, 34, 118, 0.2);
}

.search-button:disabled {
    background: linear-gradient(135deg, #9a89a0 0%, #b3a2b8 100%);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.search-button.loading {
    position: relative;
    color: transparent;
}

.search-button.loading::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: button-loading-spinner 0.6s linear infinite;
}

@keyframes button-loading-spinner {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Autocomplete dropdowns */
.location-suggestions {
    display: none;
    visibility: visible !important;
    opacity: 1 !important;
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    top: 100% !important;
    z-index: 99999 !important;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    font-family: inherit;
    background: white;
    width: 100%;
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    box-sizing: border-box;
    margin-top: 8px;
}

.location-suggestions.active {
    display: block !important;
}

.suggestion-item {
    padding: 14px 16px;
    border-radius: 0;
    border: none;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Lato', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 15px;
    background: #fff;
    color: #333;
    text-align: left;
    display: block;
}

.suggestion-item:last-child {
    border-bottom: none;
    border-radius: 0 0 12px 12px;
}

.suggestion-item:first-child {
    border-radius: 12px 12px 0 0;
}

.suggestion-item:only-child {
    border-radius: 12px;
}

.suggestion-item:hover {
    background: rgba(96, 34, 118, 0.05);
}

.suggestion-item.selected {
    background: rgba(96, 34, 118, 0.1);
}

/* Location match styling - your service areas */
.suggestion-item.location-match {
    background: rgba(96, 34, 118, 0.03);
    border-left: 3px solid #602276;
}

.suggestion-item.location-match:hover {
    background: rgba(96, 34, 118, 0.08);
}

.suggestion-item.location-match strong {
    color: #602276;
}

/* Search Results Message Styles */
.search-results-message,
.search-results-banner {
    font-family: 'Lato', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 1.1em;
    color: #fff;
    margin-bottom: 24px;
    padding: 0px;
    text-align: left;
    line-height: 1.5;
    transition: opacity 0.3s ease;
}

.search-results-message.hiding {
    opacity: 0;
}

/* Search status */
.search-status {
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
}

.search-status.info {
    background: #e8f4fd;
    color: #1e40af;
}

.search-status.error {
    background: #fef2f2;
    color: #991b1b;
}

.search-status.success {
    background: #ecfdf5;
    color: #065f46;
}

.search-status a {
    color: inherit;
    text-decoration: underline;
}

/* Mobile responsive styles */
@media (max-width: 640px) {
    .search-input-wrapper {
        flex-direction: column;
        gap: 10px;
        padding: 12px;
    }

    .search-button {
        width: 100%;
        padding: 16px;
        font-size: 14px;
    }

    .search-input-wrapper input {
        height: 50px;
        line-height: 50px;
        padding: 0 16px;
        font-size: 18px;
    }

    .search-results-message {
        font-size: 1em;
        padding: 0px;
        margin-bottom: 24px;
    }

    .location-search-container.nowrap .search-input-wrapper {
        flex-direction: row;
        gap: 8px;
    }

    .location-search-container.nowrap .search-button {
        width: auto;
        padding: 14px 20px;
        min-width: max-content;
    }

    .location-search-container.nowrap .search-input-wrapper input {
        min-width: 0;
        flex: 1;
    }
}

/* Address box and suggestion styles (printed inline in the footer before). */
/* CRITICAL: Force parent containers to allow overflow */
.location-search-container,
.location-search-container *,
.search-input-wrapper {
    overflow: visible !important;
}

/* Autocomplete Dropdown Styling - HIGH SPECIFICITY */
.location-search-container .location-suggestions,
.search-input-wrapper .location-suggestions,
div.location-suggestions {
    background-color: #fff !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
    border: 1px solid #e0e0e0 !important;
    font-family: 'Lato', -apple-system, BlinkMacSystemFont, sans-serif !important;
    margin-top: 4px !important;
    z-index: 999999 !important;
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    top: 100% !important;
    width: 100% !important;
    max-height: 300px !important;
    overflow-y: auto !important;
    display: none;
    box-sizing: border-box !important;
}

.location-search-container .location-suggestions.active,
.search-input-wrapper .location-suggestions.active,
div.location-suggestions.active {
    display: block !important;
}

.location-suggestions .suggestion-item {
    padding: 14px 16px !important;
    cursor: pointer !important;
    border-bottom: 1px solid #f0f0f0 !important;
    font-size: 15px !important;
    line-height: 1.4 !important;
    transition: background-color 0.15s ease !important;
    background: #fff !important;
    color: #333 !important;
    display: block !important;
    text-align: left !important;
}

.location-suggestions .suggestion-item:last-child {
    border-bottom: none !important;
    border-radius: 0 0 12px 12px !important;
}

.location-suggestions .suggestion-item:first-child {
    border-radius: 12px 12px 0 0 !important;
}

.location-suggestions .suggestion-item:only-child {
    border-radius: 12px !important;
}

.location-suggestions .suggestion-item:hover {
    background-color: rgba(96, 34, 118, 0.05) !important;
}

/* Location match styling - YOUR service areas - highlighted */
.location-suggestions .suggestion-item.location-match {
    background: rgba(96, 34, 118, 0.04) !important;
    border-left: 4px solid #602276 !important;
    padding-left: 12px !important;
}

.location-suggestions .suggestion-item.location-match:hover {
    background: rgba(96, 34, 118, 0.1) !important;
}

.location-suggestions .suggestion-item.location-match strong {
    color: #602276 !important;
    font-weight: 600 !important;
}

/* Google PAC container styling */
.pac-container {
    z-index: 99999 !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
    border: 1px solid #e0e0e0 !important;
    font-family: 'Lato', -apple-system, BlinkMacSystemFont, sans-serif !important;
}

.pac-item {
    padding: 12px 14px !important;
    cursor: pointer !important;
    font-size: 14px !important;
}

.pac-item:hover, .pac-item-selected {
    background-color: rgba(96, 34, 118, 0.05) !important;
}

.pac-matched { 
    font-weight: 600 !important; 
    color: #602276 !important; 
}

.pac-logo:after { display: none !important; }

/* address autocomplete dropdown */
.location-autocomplete-dropdown {
    background-color: #fff !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
    border: 1px solid #e0e0e0 !important;
    position: absolute !important;
    z-index: 99999 !important;
    width: 100% !important;
    max-height: 300px !important;
    overflow-y: auto !important;
    display: none;
    top: 100% !important;
    left: 0 !important;
}

.location-autocomplete-dropdown.active { 
    display: block !important; 
}

.location-autocomplete-item {
    padding: 14px 16px !important;
    cursor: pointer !important;
    border-bottom: 1px solid #f0f0f0 !important;
    font-size: 15px !important;
    background: #fff !important;
    text-align: left !important;
}

.location-autocomplete-item:hover {
    background-color: rgba(96, 34, 118, 0.05) !important;
}

.location-input-wrapper, .search-input-wrapper { 
    position: relative !important; 
}

/* Suggestions list for the search box: fixed under the box so no container can clip it. */
.location-suggestions.alb-suggestions{position:fixed !important;left:0;top:0;width:300px;z-index:2147483647 !important;max-height:300px !important;overflow-y:auto !important;background:#fff !important;border:1px solid #ccc !important;border-radius:12px !important;box-shadow:0 4px 20px rgba(0,0,0,.25) !important;display:none}
.location-suggestions.alb-suggestions.active{display:block !important}
.alb-autocomplete-suggestions .suggestion-item:nth-last-child(2){border-bottom:none}
.alb-ac-google{padding:6px 12px 8px;font-size:12px;color:#5f6368;text-align:right;font-family:Roboto,Arial,sans-serif}
.alb-suggestions .alb-ac-addr small{display:block;font-size:12.5px;color:#645370;margin-top:2px}.alb-suggestions .alb-ac-pc::after{content:"Postcode";float:right;font-size:11px;font-weight:700;color:#645370;text-transform:uppercase;letter-spacing:.04em}
