/**
 * העיצוב של בורר המיקום.
 *
 * הרכיב מגיע עם הסגנון שלו כדי שיוכל לשבת גם באתר וגם במסך הניהול,
 * שני קבצי עיצוב שונים, בלי שאף אחד מהם יצטרך לדעת עליו. המשתנים
 * (--line, --ink-2 וכו׳) מוגדרים בשניהם באותם שמות ובאותם ערכים,
 * ובכל זאת יש כאן ערכי נפילה — רכיב שנשבר בלי הדף המארח אינו רכיב.
 */

.lp { display: flex; flex-direction: column; gap: 12px; }

.lp-row {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end;
}
.lp-row .lp-field:nth-child(1) { flex: 1 1 180px; }
.lp-row .lp-field:nth-child(2) { flex: 2 1 220px; }
.lp-row .lp-field:nth-child(3) { flex: 0 0 96px; }

.lp-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.lp-field > label {
  font-size: 13px; font-weight: 600;
  color: var(--ink-2, #55635F);
}
.lp-field-btn { justify-content: flex-end; }

.lp-field input {
  width: 100%; padding: 9px 12px; font: inherit; font-size: 15px;
  color: var(--ink, #17211F);
  background: var(--surface, #fff);
  border: 1px solid var(--line-strong, #D2CABC);
  border-radius: var(--r-sm, 9px);
}
.lp-field input:focus-visible {
  outline: 2px solid var(--accent, #0E7C74); outline-offset: 1px;
}
.lp-field input:disabled { background: var(--surface-2, #EFEBE4); color: var(--ink-3, #85918D); }

.lp-btn {
  padding: 9px 14px; font: inherit; font-size: 14.5px; font-weight: 600;
  color: var(--ink, #17211F); background: var(--surface, #fff);
  border: 1px solid var(--line-strong, #D2CABC);
  border-radius: var(--r-sm, 9px); cursor: pointer; white-space: nowrap;
  min-height: 44px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
/* הרכיב יושב גם באתר הציבורי, שאין בו את style.css של הממשק — ולכן
   מידת הסמל מוגדרת כאן. SVG בלי מידה נמתח לגובה הכרטיס כולו. */
.lp-ic svg { width: 1.1em; height: 1.1em; display: block; }
.lp-btn:hover:not(:disabled) { background: var(--surface-2, #EFEBE4); }
.lp-btn:disabled { opacity: .55; cursor: default; }

.lp-map {
  height: 280px; border-radius: var(--r, 15px); overflow: hidden;
  border: 1px solid var(--line-strong, #D2CABC);
  background: var(--surface-2, #EFEBE4);
  position: relative; z-index: 0;
}
.lp-map.loading::after {
  content: 'טוען מפה…'; position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-3, #85918D); font-size: 14.5px;
}
.lp-map-empty {
  position: absolute; inset: 0; display: flex;
  align-items: center; justify-content: center; text-align: center;
  color: var(--ink-3, #85918D); font-size: 14.5px; padding: 16px;
}
/* Leaflet מגיע עם גופן משלו וכיווניות משלו, ושניהם אינם של העמוד. */
.lp-map .leaflet-container { font-family: inherit; direction: ltr; }
.lp-map .leaflet-control-attribution { font-size: 10px; }

.lp-coords {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end;
  padding: 12px 14px; border-radius: var(--r-sm, 9px);
  background: var(--surface-2, #EFEBE4);
}
.lp-coords .lp-field { flex: 1 1 120px; }
.lp-coords .lp-field input { font-variant-numeric: tabular-nums; }

.lp-state, .lp-hint, .lp-elev-state {
  font-size: 13px; color: var(--ink-3, #85918D); line-height: 1.55;
}
.lp-state:empty { display: none; }
.lp-elev-state { flex: 1 1 100%; }

@media (max-width: 560px) {
  .lp-map { height: 220px; }
  .lp-row .lp-field:nth-child(3) { flex: 0 0 80px; }
}
