/* Maps by Funk — Atlas: video and creator pages (views.js).
   A sheet over the map area, below the header, so the brand bar and search
   stay put and "← Map" is always one step back. Tokens come from styles.css. */

.view {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  overflow-y: auto;
  background: var(--bg);
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}

.view[hidden] {
  display: none;
}

.vv,
.cv {
  max-width: 1240px;
  margin: 0 auto;
  padding: 18px 24px 64px;
}

.view-head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}

.back {
  flex-shrink: 0;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  color: var(--text-dim);
  font-size: 13px;
}

.back:hover {
  border-color: var(--teal);
  color: var(--text);
}

.view-titles {
  flex: 1;
  min-width: 0;
}

.view-titles h1 {
  margin: 2px 0 6px;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(18px, 2.2vw, 24px);
  line-height: 1.25;
  text-wrap: balance;
}

.view-sub {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  font-size: 12.5px;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}

.mini-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: -6px;
}

.view-creator {
  color: var(--teal);
  font-weight: 700;
  text-decoration: none;
}

.view-creator:hover {
  text-decoration: underline;
}

.btn-primary,
.btn-ghost {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 14px;
  border-radius: 5px;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 12.5px;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--teal);
  color: var(--near-black);
  border: 1px solid var(--teal);
}

.btn-primary:hover {
  background: var(--off-white);
  border-color: var(--off-white);
}

.btn-ghost {
  border: 1px solid var(--line);
  color: var(--text);
  background: transparent;
}

.btn-ghost:hover {
  border-color: var(--teal);
}

.count-pill {
  display: inline-block;
  min-width: 20px;
  padding: 1px 7px;
  border-radius: 10px;
  background: var(--surface-hi);
  color: var(--text-dim);
  font-family: var(--f-body);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  font-variant-numeric: tabular-nums;
  vertical-align: middle;
}

.sample-note {
  margin: 0 0 12px;
  padding: 9px 12px;
  border: 1px dashed var(--teal-deep);
  border-radius: 6px;
  background: rgba(103, 203, 166, 0.07);
  color: var(--text-dim);
  font-size: 12.5px;
  line-height: 1.45;
}

.sample-note b {
  color: var(--teal);
}

.disclosure {
  margin: 10px 0 0;
  font-size: 11.5px;
  color: var(--text-faint);
}

.empty-block {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text-faint);
  font-size: 13px;
  line-height: 1.5;
  list-style: none;
}

.empty-block strong {
  display: block;
  margin-bottom: 3px;
  color: var(--text-dim);
  font-family: var(--f-display);
}

/* ---------- video page ---------- */

.vv-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 22px;
  align-items: start;
}

.vv-player {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  overflow: hidden;
  background: var(--near-black);
  border: 1px solid var(--line);
}

.vv-player iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.vv-section {
  margin-top: 22px;
}

.vv-section h2,
.cv-section h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 15px;
}

.vv-side {
  position: sticky;
  top: 0;
}

.vv-map {
  height: min(62vh, 520px);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.vv-map-caption {
  margin: 8px 2px 0;
  font-size: 12px;
  color: var(--text-faint);
}

.vv-map-source {
  margin: 4px 2px 0;
  font-size: 11px;
  color: var(--text-faint);
}

.vv-venues {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.vv-venue {
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  transition: border-color 0.15s ease;
}

.vv-venue:hover,
.vv-venue.is-active {
  border-color: var(--teal);
}

.vv-venue-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.vv-num {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--teal);
  color: var(--near-black);
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 12px;
}

.vv-venue-title {
  flex: 1;
  min-width: 0;
}

.vv-venue-title h3 {
  margin: 2px 0 1px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
}

.vv-city {
  font-size: 12px;
  color: var(--text-faint);
}

/* Category colour is semantic, not the brand accent: it has to tell food
   from a hotel at a glance. */
.vv-type {
  display: inline-block;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 3px;
  background: rgba(103, 203, 166, 0.14);
  color: var(--teal);
}

.vv-type-restaurant {
  background: rgba(224, 164, 88, 0.16);
  color: #e8b877;
}

.vv-type-hotel {
  background: rgba(127, 167, 217, 0.16);
  color: #9dbde6;
}

.vv-type-activity {
  background: rgba(192, 139, 214, 0.16);
  color: #d0a7e0;
}

.rating {
  flex-shrink: 0;
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  padding: 4px 9px;
  border-radius: 6px;
  background: var(--near-black);
  border: 1px solid var(--teal-deep);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.rating b {
  font-family: var(--f-display);
  font-size: 17px;
  color: var(--teal);
}

.rating-max {
  font-size: 11.5px;
  color: var(--text-faint);
}

.rating-star {
  color: #e8b877;
  font-size: 12px;
}

.rating-label {
  margin-left: 5px;
  font-size: 10.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.rating-verdict {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 12px;
  color: var(--teal);
}

.rating-none {
  font-size: 11.5px;
  color: var(--text-faint);
  border-color: var(--line);
}

.vv-review {
  margin: 9px 0 0 36px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-dim);
  max-width: 62ch;
}

.vv-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 0 36px;
}

.vv-seek,
.vv-link {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  border-radius: 13px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.vv-seek {
  border: 0;
  background: var(--teal);
  color: var(--near-black);
  font-variant-numeric: tabular-nums;
}

.vv-seek:hover {
  background: var(--off-white);
}

.vv-link {
  border: 1px solid var(--line);
  color: var(--text-dim);
}

.vv-link:hover {
  border-color: var(--teal);
  color: var(--text);
}

.vv-marker {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid var(--near-black);
  background: var(--teal);
  color: var(--near-black);
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 12px;
  display: grid;
  place-items: center;
  padding: 0;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
  transition: transform 0.12s ease;
}

.vv-marker.is-active,
.vv-marker:hover {
  background: var(--off-white);
  transform: scale(1.18);
}

.vv-marker-plain {
  width: 16px;
  height: 16px;
  background: var(--off-white);
  cursor: default;
}

/* ---------- creator page ---------- */

.cv-hero {
  display: flex;
  align-items: flex-start;
  gap: 22px;
  margin-bottom: 20px;
}

.cv-avatar {
  flex-shrink: 0;
  width: 108px;
  height: 108px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--teal-deep);
  background: var(--surface);
}

.cv-id h1 {
  margin: 4px 0 2px;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(22px, 3vw, 30px);
}

.cv-handle {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--text-faint);
}

.cv-bio {
  margin: 0 0 12px;
  max-width: 64ch;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-dim);
  white-space: pre-line;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cv-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 22px;
}

.stat {
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.stat b {
  display: block;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 24px;
  color: var(--teal);
  font-variant-numeric: tabular-nums;
}

.stat span {
  font-size: 12px;
  color: var(--text-faint);
}

/* ---------- creator map ---------- */

.cv-map-wrap {
  position: relative;
  margin-bottom: 22px;
}

.cv-map {
  height: clamp(300px, 46vh, 460px);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.cv-legend {
  position: absolute;
  left: 12px;
  bottom: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  padding: 7px 12px;
  border-radius: 6px;
  background: rgba(17, 21, 23, 0.84);
  backdrop-filter: blur(6px);
  border: 1px solid var(--line);
  font-size: 11.5px;
  color: var(--text-dim);
  pointer-events: none;
}

.cv-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cv-legend i {
  display: inline-block;
}

.lg-country {
  width: 14px;
  height: 10px;
  border-radius: 2px;
  background: var(--teal);
  opacity: 0.7;
  border: 1px solid var(--teal);
}

.lg-place {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--off-white);
  box-shadow: 0 0 0 2px var(--near-black);
}

.lg-wish,
.cv-wish-diamond {
  width: 9px;
  height: 9px;
  transform: rotate(45deg);
  border: 2px solid #e8b877;
  border-radius: 1px;
  background: rgba(17, 21, 23, 0.6);
}

/* Wishlist uses the warm accent, deliberately apart from the teal of places
   already filmed. */
.cv-wish-marker {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 11px;
  color: #f1d3a6;
  white-space: nowrap;
  text-shadow:
    0 0 3px var(--near-black),
    0 0 6px var(--near-black);
  cursor: default;
}

.cv-wish-diamond {
  flex-shrink: 0;
  width: 11px;
  height: 11px;
}

/* A tooltip that sits under the cursor must not intercept it, or it fires the
   layer's mouseleave and flickers. */
.cv-tip {
  pointer-events: none;
}

.cv-tip .maplibregl-popup-content {
  padding: 7px 10px;
  background: var(--near-black);
  border: 1px solid var(--teal-deep);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.cv-tip .maplibregl-popup-tip {
  display: none;
}

.cv-tip b {
  font-size: 12.5px;
  color: var(--off-white);
}

.cv-tip span {
  font-size: 11px;
  color: var(--text-faint);
}

.cv-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 22px;
  align-items: start;
}

.cv-col {
  display: flex;
  flex-direction: column;
  gap: 22px;
  min-width: 0;
}

.cv-section {
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.cv-hint {
  margin: -6px 0 10px;
  font-size: 12px;
  color: var(--text-faint);
}

.cv-countries,
.cv-reviews,
.cv-videos,
.cv-wish {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cv-country {
  width: 100%;
  display: grid;
  grid-template-columns: 130px 1fr 32px;
  align-items: center;
  gap: 10px;
  padding: 5px 6px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  text-align: left;
}

.cv-country:hover {
  background: var(--surface-hi);
}

.cv-country-name {
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cv-bar {
  height: 8px;
  border-radius: 4px;
  background: var(--surface-hi);
  overflow: hidden;
}

.cv-bar span {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--teal-deep), var(--teal));
}

.cv-country-n {
  font-size: 12.5px;
  font-weight: 700;
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--text-dim);
}

.cv-wish li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 7px 4px;
  border-bottom: 1px solid var(--line);
}

.cv-wish li:last-child {
  border-bottom: 0;
}

.cv-wish-pin {
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  margin-top: 4px;
  transform: rotate(45deg);
  border: 2px solid var(--teal);
  border-radius: 2px;
}

.cv-wish b {
  display: block;
  font-size: 13.5px;
}

.cv-wish span {
  font-size: 12px;
  color: var(--text-faint);
}

.cv-review-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.cv-review {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 6px;
  text-decoration: none;
  color: inherit;
}

.cv-review:hover {
  background: var(--surface-hi);
}

.cv-review-body {
  flex: 1;
  min-width: 0;
}

.cv-review-body b {
  display: block;
  font-size: 13.5px;
}

.cv-review-body span {
  display: block;
  font-size: 11.5px;
  color: var(--text-faint);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cv-video-tools {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.cv-search,
.cv-country-select {
  height: 32px;
  padding: 0 10px;
  background: var(--surface-hi);
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--text);
  font: inherit;
  font-size: 13px;
}

.cv-search {
  flex: 1;
  min-width: 0;
}

.cv-country-select {
  max-width: 45%;
}

.cv-country-select option {
  background: var(--near-black);
}

.cv-search:focus,
.cv-country-select:focus {
  outline: none;
  border-color: var(--teal);
}

.cv-video {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px;
  border-radius: 6px;
  text-decoration: none;
  color: inherit;
}

.cv-video:hover {
  background: var(--surface-hi);
}

.cv-video img {
  flex-shrink: 0;
  width: 88px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 4px;
  background: var(--slate);
}

.cv-video > span:not(.count-pill) {
  flex: 1;
  min-width: 0;
}

.cv-video b {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.3;
}

.cv-video b + span {
  display: block;
  font-size: 11.5px;
  color: var(--text-faint);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cv-more {
  padding: 8px;
  font-size: 12px;
  color: var(--text-faint);
  text-align: center;
}

/* ---------- entry points on the map ---------- */

.card-creator {
  color: var(--text-dim);
  text-decoration: none;
}

.card-creator:hover {
  color: var(--teal);
  text-decoration: underline;
}

.card-details {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-dim);
  text-decoration: none;
}

.card-details:hover {
  color: var(--teal);
}

.card-tagged {
  margin-left: 3px;
  padding: 0 5px;
  border-radius: 7px;
  background: rgba(103, 203, 166, 0.16);
  color: var(--teal);
  font-size: 10.5px;
}

.chip.chip-profile {
  gap: 7px;
  padding-left: 4px;
  text-decoration: none;
  color: var(--teal);
  border-color: var(--teal-deep);
}

.chip-profile img {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
}

.pop-actions {
  display: flex;
  gap: 6px;
}

.pop-link-ghost {
  background: transparent;
  color: var(--teal);
  border: 1px solid var(--teal-deep);
}

.pop-link-ghost:hover {
  background: var(--surface-hi);
}

@media (max-width: 900px) {
  .vv-grid,
  .cv-grid {
    grid-template-columns: 1fr;
  }

  .vv-side {
    position: static;
  }

  .vv-map {
    height: 300px;
  }

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

  .cv-hero {
    flex-direction: column;
  }

  .view-head {
    flex-wrap: wrap;
  }
}

/* An inferred location, never dressed as a confirmed one. */
.inferred-badge {
  display: inline-block;
  margin-left: 5px;
  padding: 0 5px;
  border: 1px dashed var(--wish);
  border-radius: 7px;
  font-size: 9.5px;
  line-height: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--wish);
  vertical-align: 1px;
}

/* ---------- unclaimed profile notice ---------- */

.unclaimed {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin: 0 0 14px;
  padding: 12px 15px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--wish);
  border-radius: 8px;
  background: var(--near-black);
}

.unclaimed-body {
  flex: 1 1 300px;
  min-width: 0;
}

.unclaimed-body b {
  font-family: var(--f-display);
  font-size: 13px;
  color: var(--wish);
}

.unclaimed-body p {
  margin: 3px 0 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-dim);
}

.unclaimed-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
