/* Curated POI — Public Map App only (never synced from OSiris). */

.poi-curated-panel {
  width: 22rem;
  max-width: calc(100vw - 32px);
}

.poi-curated-body {
  max-height: min(70vh, 32rem);
  overflow-y: auto;
}

.poi-curated-hero {
  width: 100%;
  height: 8.5rem;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 0.75rem;
  background: #1e293b;
}

.poi-curated-hero-icon {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1392ec;
}

.poi-curated-hero-icon .material-symbols-outlined {
  font-size: 3rem;
  color: #fff;
  font-variation-settings: 'FILL' 1;
}

.poi-star-field {
  margin-top: 0.75rem;
}

.poi-star-row {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  flex-wrap: wrap;
}

.poi-star-btn {
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  color: rgba(148, 163, 184, 0.55);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.poi-star-btn.is-on {
  color: #f59e0b;
}

.poi-star-clear {
  margin-left: 0.35rem;
  min-height: 36px;
  padding: 0.25rem 0.6rem;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: transparent;
  color: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

.poi-visual-seg {
  display: flex;
  gap: 0.35rem;
  margin: 0.5rem 0 0.65rem;
}

.poi-visual-seg-btn {
  flex: 1;
  min-height: 44px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: transparent;
  color: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.poi-visual-seg-btn.is-active {
  background: #1392ec;
  border-color: #1392ec;
  color: #fff;
}

.poi-icon-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.35rem;
  max-height: 11rem;
  overflow-y: auto;
  padding: 0.25rem 0;
}

.poi-icon-pick {
  width: 100%;
  aspect-ratio: 1;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(148, 163, 184, 0.08);
  color: inherit;
  cursor: pointer;
  padding: 0;
}

.poi-icon-pick .material-symbols-outlined {
  font-size: 1.35rem;
  font-variation-settings: 'FILL' 1;
}

.poi-icon-pick.is-selected {
  border-color: #1392ec;
  background: rgba(19, 146, 236, 0.2);
  color: #1392ec;
}

.poi-map-visual a {
  color: #1392ec;
  text-decoration: underline;
}

/* Tab label: full on desktop, short on mobile */
.poi-tab-label-short {
  display: none;
}
.poi-tab-label-full {
  display: inline;
}

/* Mobile: keep all Layers tabs reachable (horizontal scroll, sticky, short POI label) */
@media (max-width: 767px) {
  .poi-tab-label-short {
    display: inline;
  }
  .poi-tab-label-full {
    display: none;
  }

  #bottom-panel-tabs {
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    position: sticky;
    top: 0;
    z-index: 2;
    background: rgb(246, 247, 248);
    padding-top: 0.25rem;
    margin-top: -0.25rem;
  }
  html.dark #bottom-panel-tabs {
    background: rgb(15, 23, 42);
  }
  #bottom-panel-tabs::-webkit-scrollbar {
    display: none;
  }
  #bottom-panel-tabs .tab-btn {
    flex-shrink: 0;
    white-space: nowrap;
  }
}

.poi-curated-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.poi-curated-rating {
  color: #f59e0b;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  margin: 0.35rem 0 0.5rem;
}

.poi-curated-rating-empty {
  color: rgba(148, 163, 184, 0.55);
}

.poi-curated-text {
  font-size: 0.85rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.78);
  margin: 0.4rem 0 0.75rem;
  white-space: pre-wrap;
}

html.light .poi-curated-text {
  color: rgba(15, 23, 42, 0.75);
}

.poi-curated-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 44px;
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(19, 146, 236, 0.45);
  color: #1392ec;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
}

.poi-curated-link:hover {
  background: rgba(19, 146, 236, 0.12);
}

.poi-curated-mgmt-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.poi-panel-map-image {
  margin-top: 0.85rem;
  padding: 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(148, 163, 184, 0.06);
}

html.light .poi-curated-mgmt-actions {
  border-top-color: rgba(15, 23, 42, 0.1);
}

.poi-curated-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 44px;
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: transparent;
  color: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.poi-curated-btn--primary {
  background: #1392ec;
  border-color: #1392ec;
  color: #fff;
}

.poi-curated-btn--danger {
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.4);
}

.poi-mgmt-banner {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 55;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.75rem 0.55rem 0.9rem;
  border-radius: 10px;
  border: 1px solid rgba(19, 146, 236, 0.55);
  background: rgb(15, 23, 42);
  color: #f1f5f9;
  font-size: 0.8rem;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  max-width: calc(100vw - 24px);
}

html.light .poi-mgmt-banner {
  background: #fff;
  color: #0f172a;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.15);
}

.poi-mgmt-exit {
  margin-left: 0.25rem;
  min-height: 36px;
  padding: 0.3rem 0.7rem;
  border-radius: 8px;
  border: 1px solid rgba(19, 146, 236, 0.5);
  background: #1392ec;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
}

.poi-place-bar {
  position: fixed;
  top: 64px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 56;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  border: 1px solid rgba(19, 146, 236, 0.5);
  background: rgb(15, 23, 42);
  color: #f1f5f9;
  font-size: 0.85rem;
  font-weight: 500;
  max-width: calc(100vw - 24px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

html.light .poi-place-bar {
  background: #fff;
  color: #0f172a;
}

.poi-place-cancel {
  min-height: 36px;
  padding: 0.3rem 0.7rem;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.8rem;
}

.poi-place-actions {
  display: flex;
  gap: 0.4rem;
  margin-left: auto;
}

.poi-pick-overlay {
  position: fixed;
  inset: 0;
  z-index: 54;
  cursor: crosshair;
  background: transparent;
}

.poi-form-section {
  padding: 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(148, 163, 184, 0.06);
}

.poi-form-section-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #1392ec;
  margin-bottom: 0.55rem;
}

.poi-form-input {
  width: 100%;
  min-height: 44px;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(255, 255, 255, 0.9);
  color: #0f172a;
  font-size: 0.9rem;
}

html.dark .poi-form-input {
  background: rgba(255, 255, 255, 0.06);
  color: #f1f5f9;
  border-color: rgba(255, 255, 255, 0.12);
}

.poi-form-input:focus {
  outline: 2px solid rgba(19, 146, 236, 0.45);
  outline-offset: 1px;
}

.poi-form-dialog {
  color: inherit;
}

.poi-image-upload-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 0.25rem;
}

.poi-image-upload-hint {
  font-size: 0.7rem;
  color: #94a3b8;
  margin: 0 0 0.65rem;
  line-height: 1.35;
}

.poi-image-upload-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.poi-image-preview {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  border-radius: 8px;
  border: 1px dashed rgba(148, 163, 184, 0.5);
  background: rgba(148, 163, 184, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: #94a3b8;
}

.poi-image-preview.has-image {
  border-style: solid;
}

.poi-image-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.poi-image-upload-actions {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
}

.poi-file-label {
  cursor: pointer;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.poi-loc-share {
  min-width: 44px;
  min-height: 44px;
  color: #64748b;
}

.poi-loc-share:active {
  background: rgba(148, 163, 184, 0.2);
}

@media (max-width: 767px) {
  .poi-mgmt-banner {
    top: auto;
    bottom: 12px;
  }
  .poi-place-bar {
    top: auto;
    bottom: 72px;
  }
  body:has(#poi-mgmt-banner) .poi-place-bar {
    bottom: 68px;
  }
  body:has(#poi-mgmt-banner):has(#poi-place-bar) .poi-mgmt-banner {
    bottom: 12px;
  }
}
