﻿:root {
  --bg: #f6f8fb;
  --surface: #ffffff;
  --ink: #162435;
  --muted: #627086;
  --line: #d8e1ec;
  --brand: #0f7f73;
  --brand-dark: #0b5f56;
  --accent: #f4b640;
  --danger: #8a2f2f;
  --ring: rgba(14, 138, 125, 0.22);
  --hero-overlay: rgba(10, 20, 35, 0.7);
  --hero-overlay-soft: rgba(10, 20, 35, 0.42);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Nunito Sans", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.45;
}

.shell {
  width: min(1240px, 100% - 2rem);
  margin-inline: auto;
}

.site-hero {
  color: #fff;
  background:
    linear-gradient(180deg, var(--hero-overlay), var(--hero-overlay-soft)),
    url("assets/hero-1.jpg") center 28%/cover no-repeat;
  padding-bottom: 2.3rem;
}

.topbar {
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.topbar-inner {
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.topbar-text {
  margin: 0;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.88);
}

.topbar-links {
  display: flex;
  gap: 1rem;
}

.topbar-links a {
  color: #fff;
  text-decoration: none;
  font-size: 0.8rem;
  opacity: 0.9;
}

.main-nav {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  color: #fff;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  font-family: "Poppins", sans-serif;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.14);
  font-size: 0.75rem;
}

.hero-content {
  max-width: 760px;
  padding: 2.2rem 0 1.1rem;
}

.eyebrow {
  margin: 0;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(255, 255, 255, 0.86);
  font-weight: 700;
}

h1 {
  margin: 0.42rem 0 0;
  font-family: "Poppins", sans-serif;
  font-size: clamp(2rem, 4.5vw, 3.3rem);
  line-height: 1.08;
}

.subhead {
  margin: 0.72rem 0 0;
  font-size: 0.96rem;
  max-width: 60ch;
  color: rgba(255, 255, 255, 0.92);
}

.hero-search {
  background: #fff;
  color: var(--ink);
  border-radius: 14px;
  border: 1px solid #dfe7f2;
  padding: 0.82rem;
  display: grid;
  gap: 0.75rem;
  box-shadow: 0 18px 34px rgba(3, 13, 30, 0.22);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 1rem;
}

.metric-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.8rem 0.85rem;
  display: grid;
  gap: 0.22rem;
  box-shadow: 0 8px 24px rgba(22, 34, 52, 0.07);
}

.metric-card strong {
  font-family: "Poppins", sans-serif;
  font-size: 1.22rem;
}

.metric-card span {
  font-size: 0.86rem;
  color: var(--muted);
}

.categories-shell {
  margin-top: 0.95rem;
  padding: 1rem;
}

.category-pills {
  margin: 0.9rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.7rem;
}

.pill {
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  padding: 0.65rem 0.72rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  cursor: pointer;
}

.pill span {
  color: #304158;
  font-size: 0.87rem;
  text-transform: capitalize;
}

.pill strong {
  color: var(--brand-dark);
  font-size: 0.88rem;
}

.layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem;
  padding-top: 1rem;
  padding-bottom: 2.4rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 8px 22px rgba(23, 33, 48, 0.05);
}

.status {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

#status {
  padding: 0.75rem 0.9rem;
}

.field-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

label {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
  color: #30445f;
}

.range-note {
  margin: 0;
  font-size: 0.81rem;
  color: var(--muted);
}

input,
select,
button,
textarea {
  font: inherit;
}

input[type="search"],
select,
input[type="text"],
input[type="number"],
input[type="url"],
textarea,
input:not([type]) {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 0.66rem 0.72rem;
  background: #fff;
  outline: none;
}

input[type="search"]:focus,
select:focus,
input[type="text"]:focus,
input[type="number"]:focus,
input[type="url"]:focus,
textarea:focus,
input:not([type]):focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--ring);
}

input[type="range"] {
  width: 100%;
  accent-color: var(--brand);
}

.button-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.btn {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #f6f8fb;
  color: #26374d;
  padding: 0.64rem 0.86rem;
  min-height: 40px;
  cursor: pointer;
  font-weight: 700;
}

.btn.primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.btn.nav-btn {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.26);
  color: #fff;
}

.btn.danger {
  background: #fff3f3;
  border-color: #f0c9c9;
  color: var(--danger);
}

.map-panel,
#map {
  min-height: 68vh;
}

.map-panel {
  overflow: hidden;
}

#map {
  height: 68vh;
  background: #dfe7ee;
}

.results,
.submission,
.reviews,
.listing-detail,
.moderation {
  padding: 0.88rem;
}

.listing-detail[hidden] {
  display: none;
}

.detail-hero {
  width: calc(100% + 1.76rem);
  margin: -0.88rem -0.88rem 1rem;
  height: 220px;
  background-size: cover;
  background-position: center;
  border-radius: 10px 10px 0 0;
}
.detail-hero[hidden] { display: none; }

.results-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.8rem;
}

h2 {
  margin: 0;
  font-family: "Poppins", sans-serif;
  font-size: 1.04rem;
}

#resultCount,
.meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

#placesList {
  list-style: none;
  margin: 0.84rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
  gap: 0.7rem;
}

.place-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}

.place-media {
  min-height: 84px;
  padding: 0.62rem;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  background: linear-gradient(135deg, #1f7897, #39b39f);
  background-size: cover;
  background-position: center;
}

.place-media.has-photo {
  background-color: #1d2d3f;
}

.media-tag {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 999px;
  padding: 0.16rem 0.42rem;
  background: rgba(255, 255, 255, 0.15);
}

.cat-restaurant {
  background: linear-gradient(140deg, #8b4f2f, #cc8749);
}

.cat-marina,
.cat-fuel {
  background: linear-gradient(140deg, #1b5b86, #38a3d4);
}

.cat-boat-ramp,
.cat-attraction {
  background: linear-gradient(140deg, #2a6d52, #48b485);
}

.cat-boat-dealer,
.cat-repair-shop {
  background: linear-gradient(140deg, #5a3f9f, #8e70cf);
}

.place-top,
.place-card .meta,
.place-card > a {
  padding-inline: 0.8rem;
}

.place-top {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  padding-top: 0.58rem;
}

.place-title {
  margin: 0;
  margin-right: auto;
  font-size: 0.94rem;
}

.badge {
  border: 1px solid #c7d4e3;
  color: #2f4a66;
  background: #f3f8fd;
  border-radius: 999px;
  padding: 0.1rem 0.46rem;
  font-size: 0.68rem;
  text-transform: capitalize;
}

.badge.sponsor {
  border-color: #dfb972;
  color: #7e5200;
  background: #fff3d7;
}

.badge.verified {
  border-color: #79bca5;
  color: #0f6b63;
  background: #e8f7f1;
}

.badge.opentable {
  border-color: #e2b3b3;
  color: #8f1f1f;
  background: #fff2f2;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.badge.enriched {
  border-color: #b39ddb;
  color: #563a86;
  background: #f3ecff;
}

.place-card .meta {
  margin: 0.25rem 0;
  font-size: 0.81rem;
}

.place-card > a {
  display: inline-block;
  margin: 0.5rem 0 0.8rem;
  color: var(--brand);
  text-decoration: none;
  font-weight: 700;
}

.place-actions {
  padding: 0.38rem 0.8rem 0.78rem;
  display: flex;
  gap: 0.6rem;
  align-items: center;
  flex-wrap: wrap;
}

.place-actions a {
  color: var(--brand);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
}

.opentable-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.opentable-icon {
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 999px;
  background: #b53030;
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  display: inline-grid;
  place-items: center;
  line-height: 1;
}

.detail-btn {
  min-height: 36px;
  padding: 0.38rem 0.66rem;
  font-size: 0.78rem;
}

.detail-tabs {
  margin-top: 0.75rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tab-btn {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f6f8fb;
  color: #26374d;
  padding: 0.4rem 0.72rem;
  font-size: 0.82rem;
  cursor: pointer;
}

.tab-btn.active {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.detail-panels {
  margin-top: 0.8rem;
}

.detail-panel {
  display: none;
}

.detail-panel.active {
  display: block;
}

.detail-grid {
  margin-top: 0.72rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.7rem;
}

.detail-grid h4,
.menu-section h4 {
  margin: 0;
  font-size: 0.9rem;
  font-family: "Poppins", sans-serif;
}

.detail-list,
.simple-list {
  margin: 0.45rem 0 0;
  padding-left: 1rem;
}

.detail-list li,
.simple-list li {
  margin: 0.36rem 0;
}

.detail-form {
  display: grid;
  gap: 0.7rem;
}

/* Detail overview */
.detail-rating-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.85rem;
  flex-wrap: wrap;
}
.detail-rating-bar .dstars {
  color: #e8a020;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
}
.detail-rating-bar .davg {
  font-weight: 700;
  font-size: 1rem;
  font-family: "Poppins", sans-serif;
}
.detail-rating-bar .dcount {
  font-size: 0.82rem;
  color: var(--muted);
}
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.detail-summary {
  margin: 0 0 1rem;
  font-size: 0.92rem;
  color: #3d5166;
  line-height: 1.55;
}
.detail-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.6rem 1rem;
  margin-bottom: 0.9rem;
}
.detail-info-item {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.detail-info-item .dil {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  font-weight: 600;
}
.detail-info-item .div {
  font-size: 0.88rem;
  color: #2a3d52;
}
.detail-info-item a {
  color: var(--brand);
  text-decoration: none;
  font-weight: 600;
}
.detail-info-item a:hover { text-decoration: underline; }
.detail-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.2rem;
}

/* Review items */
.review-avg-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--line);
}
.review-avg-bar .rstars { color: #e8a020; font-size: 1.1rem; }
.review-avg-bar .ravg { font-weight: 700; font-size: 1rem; font-family: "Poppins", sans-serif; }
.review-avg-bar .rcount { font-size: 0.82rem; color: var(--muted); }
.review-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.2rem;
  display: grid;
  gap: 0.75rem;
}
.review-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.7rem 0.9rem;
}
.review-header {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin-bottom: 0.35rem;
}
.review-header .rstars { color: #e8a020; font-size: 0.85rem; }
.review-header .rauthor { font-weight: 600; font-size: 0.85rem; }
.review-header .rdate { font-size: 0.75rem; color: var(--muted); margin-left: auto; }
.review-comment { margin: 0; font-size: 0.86rem; color: #3d5166; line-height: 1.45; }

/* Write-review form inside detail */
.write-review {
  border-top: 1px solid var(--line);
  padding-top: 1rem;
  margin-top: 0.5rem;
}
.write-review h4 {
  margin: 0 0 0.6rem;
  font-size: 0.95rem;
  font-family: "Poppins", sans-serif;
}
.inline-review-status { margin-top: 0.4rem; }

.map-pin-wrapper { background: none; border: none; }
.map-pin {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.45);
}

.popup-actions {
  margin-top: 0.4rem;
}

.popup-btn {
  border: 1px solid var(--brand);
  background: var(--brand);
  color: #fff;
  border-radius: 8px;
  padding: 0.32rem 0.6rem;
  font-size: 0.78rem;
  cursor: pointer;
}

.form-grid {
  margin-top: 0.8rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.7rem;
}

.form-grid .full {
  grid-column: 1 / -1;
}

textarea {
  resize: vertical;
}

#pendingList {
  margin: 0.8rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.7rem;
}

#osmPendingList {
  margin: 0.8rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.7rem;
}

.mod-subhead {
  margin: 1rem 0 0.2rem;
  font-size: 0.92rem;
  font-family: "Poppins", sans-serif;
}

.pending-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.74rem;
  display: grid;
  gap: 0.36rem;
}

.pending-actions {
  display: flex;
  gap: 0.5rem;
}

@media (min-width: 920px) {
  .hero-search {
    grid-template-columns: minmax(0, 2fr) minmax(180px, 1fr) minmax(180px, 1fr) auto;
    align-items: end;
  }

  .hero-search .button-row {
    flex-direction: column;
  }

  .layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      "status status"
      "map map"
      "list list"
      "detail detail"
      "moderation moderation";
  }

  #status {
    grid-area: status;
  }

  .map-panel {
    grid-area: map;
  }

  .results {
    grid-area: list;
  }

  #placesList {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }

  .listing-detail {
    grid-area: detail;
  }

  .submission {
    grid-area: submission;
  }

  .moderation {
    grid-area: moderation;
  }

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

@media (max-width: 600px) {
  .metrics {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  #placesList {
    grid-template-columns: 1fr;
  }

  #map {
    height: 52vh;
    min-height: 52vh;
  }

  .button-row {
    flex-direction: column;
  }
}

/* ── Explore app bar ─────────────────────────────────────── */
.app-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(23, 33, 48, 0.08);
}

.app-bar-inner {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.6rem 0;
  flex-wrap: wrap;
}

.app-brand {
  color: var(--ink);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-family: "Poppins", sans-serif;
  flex-shrink: 0;
}

.app-brand .brand-mark {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.brand-name {
  display: none;
}

.app-search {
  flex: 1;
  display: flex;
  gap: 0.4rem;
  min-width: 0;
  align-items: center;
  flex-wrap: wrap;
}

.app-search input[type="search"] {
  flex: 2;
  min-width: 120px;
}

.app-search #locationInput {
  flex: 1;
  min-width: 100px;
  max-width: 180px;
}

.app-search select {
  min-width: 150px;
  flex-shrink: 0;
}

.toggle-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 0.35rem 0.62rem;
  color: #304158;
  font-size: 0.82rem;
  white-space: nowrap;
}

.toggle-chip input {
  margin: 0;
}

.app-actions {
  display: flex;
  gap: 0.4rem;
  flex-shrink: 0;
}

.filter-bar {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.32rem 0 0.44rem;
  border-top: 1px solid var(--line);
}

.filter-bar label {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  color: #30445f;
  white-space: nowrap;
}

.filter-bar input[type="range"] {
  width: 120px;
}

.filter-bar .range-note {
  font-size: 0.81rem;
  margin: 0;
  white-space: nowrap;
}

@media (min-width: 600px) {
  .brand-name {
    display: inline;
  }
}

@media (max-width: 599px) {
  .app-search {
    order: 3;
    width: 100%;
    flex-basis: 100%;
  }

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

  .app-actions .btn:last-child {
    display: none;
  }

  .filter-bar {
    flex-wrap: wrap;
  }
}
