/**
 * Forminator – Dirección Predictiva Chile
 * direcciones.css v2.0.0
 */

/* ── Wrapper ── */
.fdc-wrap {
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

.fdc-wrap .fdc-input {
    width: 100% !important;
    box-sizing: border-box !important;
}

/* ── Lista de sugerencias ── */
.fdc-wrap .fdc-suggestions {
    display: none;
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    right: 0;
    z-index: 999999;
    background: #1e1e1e;
    border: 1px solid #444;
    border-top: 2px solid #f0b429;
    border-radius: 0 0 4px 4px;
    max-height: 240px;
    overflow-y: auto;
    margin: 0;
    padding: 4px 0;
    list-style: none;
    box-shadow: 0 8px 24px rgba(0,0,0,0.45);
}

.fdc-wrap .fdc-suggestions li {
    display: flex;
    flex-direction: column;
    padding: 10px 16px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    transition: background 0.12s;
}

.fdc-wrap .fdc-suggestions li:last-child { border-bottom: none; }

.fdc-wrap .fdc-suggestions li:hover,
.fdc-wrap .fdc-suggestions li.fdc-active {
    background: rgba(240,180,41,0.12);
}

.fdc-wrap .fdc-suggestions .fdc-main {
    font-size: 14px;
    font-weight: 500;
    color: #f0f0f0;
    line-height: 1.3;
}

.fdc-wrap .fdc-suggestions .fdc-secondary {
    font-size: 11px;
    color: #777;
    margin-top: 2px;
}

/* ── Spinner de búsqueda ── */
.fdc-wrap .fdc-searching {
    padding: 12px 16px;
    font-size: 13px;
    color: #777;
    font-style: italic;
    display: flex;
    align-items: center;
    gap: 8px;
}

.fdc-spinner {
    width: 14px; height: 14px;
    border: 2px solid #444;
    border-top-color: #f0b429;
    border-radius: 50%;
    animation: fdc-spin 0.7s linear infinite;
    flex-shrink: 0;
}

@keyframes fdc-spin { to { transform: rotate(360deg); } }

/* ── Sin resultados ── */
.fdc-wrap .fdc-no-results {
    padding: 12px 16px;
    font-size: 13px;
    color: #666;
    font-style: italic;
}

/* ── Scrollbar ── */
.fdc-wrap .fdc-suggestions::-webkit-scrollbar       { width: 4px; }
.fdc-wrap .fdc-suggestions::-webkit-scrollbar-track { background: transparent; }
.fdc-wrap .fdc-suggestions::-webkit-scrollbar-thumb { background: #555; border-radius: 2px; }

/* ── Contenedor del mapa ── */
.fdc-map-container {
    width: 100%;
    margin-top: 10px;
    border: 1px solid #333;
    border-radius: 4px;
    overflow: hidden;
    display: none;
}

.fdc-map-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #f0b429;
    padding: 8px 14px;
    background: #1a1a1a;
    border-bottom: 1px solid #2a2a2a;
}

/* El canvas del mapa (Leaflet) */
.fdc-map-canvas {
    width: 100%;
    height: 280px;
}

/* ── Barra de dirección confirmada ── */
.fdc-map-confirm {
    background: #151515;
    border-top: 1px solid #2a2a2a;
    padding: 10px 14px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.fdc-map-confirm .fdc-address-display {
    font-size: 12px;
    color: #aaa;
    flex: 1;
    line-height: 1.5;
}

.fdc-map-confirm .fdc-drag-hint {
    font-size: 10px;
    color: #555;
    flex-shrink: 0;
    padding-top: 2px;
}

/* ── Atribución OSM ── */
.fdc-osm-credit {
    font-size: 10px;
    color: #444;
    text-align: right;
    padding: 4px 10px;
    background: #111;
}

.fdc-osm-credit a {
    color: #666;
    text-decoration: none;
}

/* ── Overrides Leaflet para tema oscuro ── */
.fdc-map-canvas .leaflet-container {
    background: #1a1a1a;
    font-family: inherit;
}

.fdc-map-canvas .leaflet-control-zoom a {
    background: #222;
    color: #ccc;
    border-color: #333;
}

.fdc-map-canvas .leaflet-control-zoom a:hover {
    background: #333;
    color: #f0b429;
}

.fdc-map-canvas .leaflet-control-attribution {
    background: rgba(0,0,0,0.6);
    color: #555;
    font-size: 9px;
}

.fdc-map-canvas .leaflet-control-attribution a {
    color: #666;
}
