/* ═══════════════════════════════════════════════════════════
   location_picker.css
   Drop this into your main stylesheet or <style> block.
   Matches the existing profile form design system:
   Fraunces + Archivo, --primary #2C5F2D, --accent #FF8C42
   ═══════════════════════════════════════════════════════════ */

/* ── Widget wrapper ──────────────────────────────────────── */
.location-picker-widget {
    border: 2px solid var(--border-soft);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 24px;
    background: #fff;
    box-shadow: 0 2px 12px rgba(44, 95, 45, 0.07);
    transition: border-color 0.3s;
}

.location-picker-widget:focus-within {
    border-color: var(--primary);
}

/* ── Header bar ──────────────────────────────────────────── */
.lp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: linear-gradient(135deg, #f0f7f0, #e8f4e8);
    border-bottom: 1px solid var(--border-soft);
    flex-wrap: wrap;
    gap: 10px;
}

.lp-title {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.lp-title i {
    color: var(--accent);
    font-size: 18px;
}

/* ── Detect button ───────────────────────────────────────── */
.lp-detect-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.25s, transform 0.15s, box-shadow 0.25s;
    box-shadow: 0 2px 8px rgba(44, 95, 45, 0.25);
    white-space: nowrap;
}

.lp-detect-btn:hover {
    background: #1e4520;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(44, 95, 45, 0.35);
}

.lp-detect-btn:active {
    transform: translateY(0);
}

/* ── Status banner ───────────────────────────────────────── */
.lp-status {
    display: none;
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 500;
    border-bottom: 1px solid transparent;
    transition: all 0.3s;
}

.lp-status--info {
    background: #EBF5FB;
    color: #1A5276;
    border-color: #AED6F1;
    display: block;
}

.lp-status--success {
    background: #EAFAF1;
    color: #1D6A38;
    border-color: #A9DFBF;
    display: block;
}

.lp-status--warn {
    background: #FEF9E7;
    color: #7D6608;
    border-color: #F9E07F;
    display: block;
}

.lp-status--error {
    background: #FDEDEC;
    color: #922B21;
    border-color: #F5B7B1;
    display: block;
}

/* ── Map container ───────────────────────────────────────── */
#lp-map {
    width: 100%;
    height: 320px;
    background: #e8e8e8;
    position: relative;
}

/* Leaflet override: keep attribution readable */
.leaflet-control-attribution {
    font-size: 10px !important;
    opacity: 0.7;
}

/* ── Hint text ───────────────────────────────────────────── */
.lp-hint {
    padding: 10px 18px;
    font-size: 12px;
    color: var(--text-medium);
    background: #FAFAF8;
    border-top: 1px solid var(--border-soft);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ── Coordinate badge (optional debug display) ───────────── */
.lp-coords-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: rgba(44, 95, 45, 0.08);
    border-radius: 20px;
    font-family: monospace;
    font-size: 12px;
    color: var(--primary);
    margin-left: auto;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 600px) {
    #lp-map { height: 240px; }
    .lp-header { flex-direction: column; align-items: flex-start; }
    .lp-detect-btn { width: 100%; justify-content: center; }
}
