/* Tarjetas de localización, diálogo y controles del mapa. */

/* Selección de ubicaciones y controles táctiles */
.locations {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 245px), 1fr));
  gap: 24px;
}

.location-card {
  min-width: 0;
  padding: 24px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.location-card header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 14px;
}

.location-card h3 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -.5px;
}

.location-letter, .pin-target {
  background: var(--blue);
  color: white;
}

.location-letter {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-weight: 700;
}

[data-point="destination"] .location-letter, [data-point="destination"] .pin-target {
  background: var(--navy);
}

.map-preview {
  position: relative;
  isolation: isolate;
  height: 192px;
  overflow: hidden;
  border-radius: var(--radius-inner);
  background: #e5edf6;
}

.preview-tiles, .open-picker {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.preview-tiles {
  z-index: 0;
}

.open-picker {
  border: 0;
  background: linear-gradient(0deg, #eff4ff55, transparent);
  display: grid;
  align-content: end;
  justify-content: start;
  padding: 12px 12px 12px;
}

.open-picker span {
  background: white;
  color: var(--blue);
  border: 1px solid #c7d5ef;
  padding: 8px 12px;
  box-shadow: var(--map-shadow);
  border-radius: var(--radius-control);
  font-size: 14px;
  font-weight: 700;
}

.open-picker:focus-visible {
  outline-offset: -4px;
}

.open-picker:hover span {
  background: var(--pale);
}

.map-credit {
  position: absolute;
  bottom: 0;
  right: 0;
  padding: 1px 5px;
  background: #fffffff0;
  color: var(--ink);
  font: 11px/1.6 Arial,sans-serif;
}

.preview-marker i {
  display: block;
  width: 18px;
  height: 18px;
  border-radius: 100%;
  border: 3px solid white;
  background: var(--blue);
  box-shadow: var(--map-shadow);
}

.location-card .point-status {
  font-size: 12px;
  min-height: 0;
  margin: 12px 0 18px;
  overflow-wrap: anywhere;
}

.manual-entry {
  margin-top: 12px;
}

.manual-entry summary, .message-details summary, .footer-bottom summary {
  align-content: center; 
  padding-block: 0px;
}

.manual-entry .coordinates {
  gap: 8px;
}

.manual-entry .coordinates label {
  flex: 1;
  min-width: 0;
}

.manual-entry .manual-button {
  font-size: 14px;
  min-height: var(--map-touch);
}

.inline-error {
  margin: 8px 0 0;
  color: #9d3021;
  font-size: 13px;
}

.inline-error:empty {
  display: none;
}

.choosing-location, .choosing-location body {
  overflow: hidden;
  overscroll-behavior: none;
}

#pin-picker {
  box-sizing: border-box;
  position: fixed;
  inset: 0;
  padding: 0;
  margin: auto;
  width: min(780px, calc(100% - 48px));
  height: min(760px, calc(100vh - 48px));
  height: min(760px, calc(100dvh - 48px));
  border: 0;
  border-radius: var(--radius-panel);
  max-width: none;
  max-height: none;
  overflow: hidden;
  color: var(--ink);
  background: white;
  box-shadow: 0 20px 85px #12285046;
  overscroll-behavior: contain;
}

#pin-picker::backdrop {
  background: #11224890;
}

.picker-frame {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  height: 100%;
}

.picker-head, .picker-foot {
  display: grid;
  gap: 8px;
}

.picker-head {
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 16px 20px;
  border-bottom: 1px solid #333;
}

#picker-close {
  grid-area: 1 / 2 / 3 / 3;
  align-self: start;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  background: var(--inset);
  color: var(--ink);
  border: 1px solid #393939;
  border-radius: 50%;
}

.picker-head h2 {
  margin: 0;
  font-size: clamp(20px, 3vw, 27px);
  letter-spacing: -.7px;
}

.picker-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.picker-actions .button {
  justify-content: flex-start;
  gap: clamp(6px, 2vw, 12px);
  padding: 8px clamp(8px, 3vw, 20px);
  min-height: 56px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
}

.picker-actions #picker-confirm {
  justify-content: flex-end;
}

.picker-actions .button:hover {
  transform: none;
  background: var(--inset);
}

#picker-confirm-label {
  font-size: inherit;
}

.place-search {
  position: relative;
  z-index: 2;
  padding: 20px 20px;
  background: white;
}

.place-search form {
  display: flex;
  align-items: stretch;
  border: 1px solid #414141;
  border-radius: 999px;
  background: #111;
  overflow: hidden;
  padding: 2px;
}

.place-search form:focus-within {
  outline: 2px solid #fff;
  outline-offset: -1px;
}

.place-search input {
  flex: 1;
  min-width: 0;
  font-size: 16px;
  min-height: var(--map-touch);
  margin: 0;
}

.search-button {
  display: grid;
  place-items: center;
  flex: none;
  width: var(--map-touch);
  height: var(--map-touch);
  border-radius: 50%;
  border: 0;
  background: #ededed;
  color: #161616;
  padding: 0;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
}

.search-button:hover {
  background: #fff;
}

#search-feedback, #picker-feedback {
  font-size: 13px;
  line-height: 1.4;
  color: var(--ink);
}

#search-feedback:not(:empty) {
  margin-top: 6px;
}

#place-results {
  position: absolute;
  top: 100%;
  inset-inline: 20px;
  margin: 0;
  padding: 4px 8px;
  list-style: none;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  box-shadow: var(--map-shadow);
  max-height: min(32vh, 260px);
  overflow: auto;
  overscroll-behavior: contain;
}

#place-results button {
  border: 0;
  border-radius: var(--radius-inner);
  background: white;
  text-align: left;
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink);
  min-height: var(--map-touch);
  width: 100%;
  padding: 10px 14px;
}

#place-results button:hover, #place-results button:focus-visible {
  background: var(--pale);
}

.picker-stage {
  position: relative;
  isolation: isolate;
  min-height: 0;
}

#picker-map {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #e1e9f4;
}

#picker-map:focus-visible {
  outline-offset: -3px;
}

#picker-map .leaflet-control-attribution {
  font-size: 11px;
}

.pin-target {
  position: absolute;
  pointer-events: none;
  left: 50%;
  bottom: 50%;
  transform: translateX(-50%);
  width: 38px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 3px solid #fff;
  border-radius: 55% 55% 52% 52%;
  box-shadow: 0 3px 9px #132b5240;
  margin-bottom: 7px;
  font-weight: 800;
}

.pin-target::after {
  content: '';
  position: absolute;
  top: calc(100% - 1px);
  border-inline: 7px solid transparent;
  border-top: 11px solid var(--blue);
}

[data-point="destination"] .pin-target::after {
  border-top-color: var(--navy);
}

.picker-controls {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--map-shadow);
}

.picker-controls button, #locate-me {
  display: grid;
  place-items: center;
  width: var(--map-touch);
  height: var(--map-touch);
  border: 1px solid #ccd8e7;
  border-radius: var(--radius-control);
  background: white;
  color: var(--ink);
  font: 24px/1 Arial,sans-serif;
  box-shadow: var(--map-shadow);
}

.picker-controls button {
  border-radius: 0;
  box-shadow: none;
}

.picker-controls button + button {
  border-top: 0;
}

#locate-me {
  position: absolute;
  bottom: 18px;
  right: 12px;
  color: var(--blue);
}

.picker-foot {
  gap: 0;
  padding: 0;
  margin: 0;
  background: white;
  border-top: 1px solid var(--line);
}

.picker-foot p {
  margin: 0;
}

.picker-location {
  padding: 12px clamp(8px, 3vw, 20px);
  border-bottom: 1px solid #333;
}

.picker-coordinates {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 3px 12px;
  font-size: 13px;
  font-weight: 600;
}

.picker-coordinates #pin-position {
  font-family: ui-monospace, monospace;
  font-weight: 400;
}

.picker-actions .picker-arrow {
  font-size: 20px;
  line-height: 1;
}

#picker-help {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

#pin-position {
  font-size: 13px;
  color: #495c77;
  overflow-wrap: anywhere;
}

#picker-feedback:not(:empty) {
  margin-top: 4px;
}


