/* Additional styles for the location icon */
.vis-location-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: #999;
    cursor: pointer;
    z-index: 10;
    transition: color 0.2s;
    visibility: hidden;
    opacity: 0;
}

.input-with-icon .vis-location-icon {
    visibility: visible;
    opacity: 1;
}

.vis-location-icon.requesting {
    animation: vis-spin 1s linear infinite;
    color: #2196F3; /* Blue for requesting state */
}

.vis-location-icon.error {
    color: #f44336; /* Red for error state */
}

@keyframes vis-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Styles for the autocomplete "Show all results" option */
.vis-show-all-results {
    background-color: #f0f0f0;
    border-top: 1px solid #ddd;
    font-weight: bold;
    cursor: pointer;
}

.vis-show-all-results:hover {
    background-color: #e0e0e0;
}

.vis-show-all-icon {
    display: inline-block;
    margin-right: 5px;
}

/* Style the search form without a button */
.vis-search-form {
    display: flex;
    align-items: center;
    position: relative;
    width: 100%;
}

.vis-search-form input[type="text"] {
    flex: 1;
    padding-right: 35px; /* Space for the location icon */
    padding-left: 35px; /* Space for the search icon */
    border-radius: 4px;
}

/* Ensure search icon is properly positioned */
.vis-search-form .vis-search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    color: #999;
}

.vis-search-form .vis-location-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
}

/* Hide submit buttons */
.vis-search-form button[type="submit"],
.vis-search-form input[type="submit"] {
    display: none !important;
}

/* Autocomplete dropdown styling */
.vis-autocomplete-container {
    position: absolute;
    width: 100%;
    max-height: 300px;
    overflow-y: auto;
    background: white;
    border-radius: 0 0 4px 4px;
    z-index: 1000;
}

.vis-autocomplete-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.vis-autocomplete-item {
    padding: 10px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.vis-autocomplete-item:hover,
.vis-autocomplete-item.selected {
    background-color: #f9f9f9;
}

.vis-item-thumbnail {
    width: 40px;
    height: 40px;
    margin-right: 10px;
    overflow: hidden;
}

.vis-item-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vis-item-content {
    flex: 1;
}

.vis-item-title {
    font-weight: 500;
}

.vis-item-additional-data {
    font-size: 0.85em;
    color: #666;
    margin-top: 2px;
}

.vis-autocomplete-no-results {
    padding: 10px;
    text-align: center;
    color: #666;
}

.vis-has-overflow {
    max-height: 350px;
    overflow-y: auto;
}

.vis-suggestion-distance {
    font-size: 0.8em;
    color: #008000;
    margin-left: 8px;
    white-space: nowrap;
}

/* Loading indicator */
.vis-search-loader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 4px;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    pointer-events: none;
}

.vis-search-loader.active {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

.vis-loader-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: vis-spin 0.8s linear infinite;
}

.vis-loader-text {
    font-size: 14px;
    color: #666;
}

.vis-autocomplete-item.vis-show-all-results {
    font-weight: 500;
    background-color: #f7f7f7;
    text-align: center;
}

.vis-show-all-icon {
    margin-right: 5px;
}

/* Search results container styling */
.vis-search-results-wrapper {
    margin-top: 30px;
}

.vis-pagination {
    margin-top: 20px;
    text-align: center;
}

.vis-pagination .page-numbers {
    display: inline-block;
    padding: 5px 10px;
    margin: 0 3px;
    border: 1px solid #ddd;
    border-radius: 3px;
    color: #333;
    text-decoration: none;
}

.vis-pagination .page-numbers.current {
    background-color: #4CAF50;
    color: white;
    border-color: #4CAF50;
}

/* Debug info styling */
.vis-debug-info {
    font-size: 11px;
    color: #333;
    margin-top: 5px;
    padding: 8px;
    background-color: #f8f8f8;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
    display: block;
    line-height: 1.4;
    font-family: monospace;
}

.vis-debug-score {
    margin-bottom: 5px;
}

.vis-debug-boost {
    padding-top: 5px;
    border-top: 1px dotted #ccc;
    color: #0066cc;
}

/* Add special styling for verified posts */
.vis-debug-boost .verified-yes {
    color: #008800;
    font-weight: bold;
}

/* Add special styling for priority posts */
.vis-debug-boost .priority-value {
    color: #cc6600;
    font-weight: bold;
}

/* Add special styling for total boost */
.vis-debug-boost .total-boost {
    color: #6600cc;
    font-weight: bold;
} 