UNPKG

@geoapify/geocoder-autocomplete

Version:

A JavaScript address autocomplete input, compatible with Leaflet, MapLibre, OpenLayers, and other map libraries for efficient location search and geocoding.

176 lines (150 loc) 3.49 kB
.address-collection-container { max-width: 500px; margin: auto; } .autocomplete-container { position: relative; } .address-row { display: flex; flex-direction: row; margin-bottom: 10px; gap: 10px; } .address-row .main-part { flex: 1; } .small-input { width: 90px; flex-shrink: 0; } .margin-right { margin-right: 10px; } .message-container { margin-top: 10px; color: grey; } .button-container { margin-top: 20px; text-align: right; } .warning-input { border-color: #ffb610; } .geoapify-autocomplete-input { width: 100% !important; box-sizing: border-box; } /* Ensure proper spacing for autocomplete containers */ .address-field { min-height: 36px; } /* Theme selector styling */ .theme-selector { position: absolute; top: 10px; left: 10px; z-index: 1001; display: flex; align-items: center; background: white; border: 1px solid #ccc; border-radius: 6px; padding: 2px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); } .theme-label { font-size: 12px; color: #666; font-weight: 500; padding: 4px 8px 4px 12px; border-right: 1px solid #eee; background: #f8f9fa; border-radius: 4px 0 0 4px; white-space: nowrap; } .theme-selector select { padding: 4px 8px; border: none; background: transparent; color: #333; font-size: 12px; cursor: pointer; min-width: 100px; border-radius: 0 4px 4px 0; } .theme-selector select:focus { outline: none; } .theme-selector:hover { border-color: #007bff; box-shadow: 0 2px 12px rgba(0, 123, 255, 0.15); } /* Dark theme styles for the demo page */ body.theme-minimal-dark, body.theme-round-borders-dark { background-color: #1a1a1a; color: #e0e0e0; } body.theme-minimal-dark .theme-selector, body.theme-round-borders-dark .theme-selector { background: #333; border-color: #555; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3); } body.theme-minimal-dark .theme-label, body.theme-round-borders-dark .theme-label { color: #bbb; background: #444; border-right-color: #555; } body.theme-minimal-dark .theme-selector select, body.theme-round-borders-dark .theme-selector select { color: #e0e0e0; } body.theme-minimal-dark .theme-selector:hover, body.theme-round-borders-dark .theme-selector:hover { border-color: #007bff; box-shadow: 0 2px 12px rgba(0, 123, 255, 0.2); } body.theme-minimal-dark .message-container, body.theme-round-borders-dark .message-container { color: #bbb; } body.theme-minimal-dark button, body.theme-round-borders-dark button { background-color: #444; color: #e0e0e0; border: 1px solid #666; } body.theme-minimal-dark button:hover, body.theme-round-borders-dark button:hover { background-color: #555; } /* Loading spinner styling */ .loading-spinner { position: absolute; top: 50%; right: 35px; transform: translateY(-50%); width: 16px; height: 16px; border: 2px solid #e3e3e3; border-top: 2px solid #007bff; border-radius: 50%; z-index: 1001; animation: spin 0.8s linear infinite; pointer-events: none; display: none; } @keyframes spin { 0% { transform: translateY(-50%) rotate(0deg); } 100% { transform: translateY(-50%) rotate(360deg); } } /* Dark theme spinner */ body.theme-minimal-dark .loading-spinner, body.theme-round-borders-dark .loading-spinner { border-color: #444; border-top-color: #4dabf7; }