/* Styling for map-picker.js. Uses this project's CSS variables where set,
   with sane fallbacks so the widget still looks reasonable dropped into a
   project that doesn't define them. */

.map-picker-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 1rem;
}

.map-picker-dialog {
  background: var(--panel-bg, #171e2e);
  color: var(--text, #e7ecf5);
  border: 1px solid var(--panel-border, #2a3448);
  border-radius: var(--radius, 12px);
  width: min(720px, 100%);
  height: min(640px, 100%);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.map-picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--panel-border, #2a3448);
  font-weight: 600;
}

.map-picker-cancel {
  background: none;
  border: none;
  color: inherit;
  font-size: 1.1rem;
  cursor: pointer;
  line-height: 1;
  padding: 0.25rem;
}

.map-picker-map {
  flex: 1 1 auto;
  min-height: 0;
}

.map-picker-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--panel-border, #2a3448);
  flex-wrap: wrap;
}

.map-picker-hint {
  font-size: 0.8rem;
  color: var(--text-dim, #9aa7bd);
}

.map-picker-actions {
  display: flex;
  gap: 0.5rem;
  margin-left: auto;
}

.map-picker-btn {
  border-radius: 8px;
  padding: 0.45rem 1rem;
  font-size: 0.9rem;
  cursor: pointer;
  border: 1px solid var(--panel-border, #2a3448);
  background: none;
  color: inherit;
}

.map-picker-btn-primary {
  background: var(--accent, #4da3ff);
  border-color: var(--accent, #4da3ff);
  color: #fff;
  font-weight: 600;
}

.map-picker-btn-secondary:hover {
  border-color: var(--accent, #4da3ff);
}

@media (max-width: 700px) {
  .map-picker-overlay {
    padding: 0;
  }

  .map-picker-dialog {
    width: 100%;
    height: 100%;
    border-radius: 0;
  }
}
