/* OCOLO Location Autocomplete Styles */

/* Wrapper - ensure proper positioning */
.ocolo-typeahead-wrapper {
    position: relative;
    display: block;
    width: 100%;
}

/* The dropdown menu */
.ocolo-typeahead-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 10000;
    background-color: #ffffff;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
    max-height: 400px;
    overflow-y: auto;
    margin-top: -1px;
}

/* Group header styling */
.ocolo-typeahead-group-header {
    padding: 8px 16px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #666;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    border-top: 1px solid #e9ecef;
}

.ocolo-typeahead-group-header:first-child {
    border-top: none;
}

/* Individual suggestion item */
.ocolo-typeahead-suggestion {
    padding: 0;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.15s ease;
}

.ocolo-typeahead-suggestion:last-child {
    border-bottom: none;
    border-radius: 0 0 8px 8px;
}

/* Hover and cursor (keyboard navigation) state */
.ocolo-typeahead-suggestion:hover,
.ocolo-typeahead-cursor {
    background-color: #f8f9fa;
}

.ocolo-typeahead-cursor {
    background-color: #e9ecef !important;
}

/* Suggestion inner structure */
.location-suggestion {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
}

.location-icon {
    flex-shrink: 0;
    width: 24px;
    text-align: center;
    color: #157CC4;  /* OCOLO theme color */
    font-size: 16px;
}

.location-name {
    flex-grow: 1;
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

/* Highlight matched text */
.ocolo-typeahead-highlight {
    font-weight: 700;
    color: #157CC4;
    text-decoration: underline;
}

/* Empty state */
.ocolo-typeahead-empty-message {
    padding: 16px;
    text-align: center;
    color: #666;
    font-size: 13px;
}

/* Pending/loading state */
.ocolo-typeahead-pending {
    padding: 16px;
    text-align: center;
    color: #888;
    font-size: 13px;
}

.ocolo-typeahead-pending i {
    margin-right: 8px;
}

/* Hint input (ghost text) */
.ocolo-typeahead-hint {
    color: #ccc;
    background: transparent !important;
}

/* Ensure the input maintains its styling */
.ocolo-typeahead-input {
    background: transparent !important;
}

/* Dark theme variant (for homepage slider) */
.header-block-area .ocolo-typeahead-menu {
    background-color: rgba(255, 255, 255, 0.98);
}

/* Mobile responsive adjustments */
@media (max-width: 767px) {
    .ocolo-typeahead-menu {
        max-height: 300px;
    }

    .location-suggestion {
        padding: 10px 12px;
    }

    .location-name {
        font-size: 13px;
    }

    .ocolo-typeahead-group-header {
        padding: 6px 12px;
        font-size: 10px;
    }
}

/* Fix for input group styling */
.input-group .ocolo-typeahead-wrapper {
    flex: 1 1 auto;
    width: 1%;
}

.input-group .ocolo-typeahead-wrapper .form-control {
    border-radius: 0;
}
