/* Admin sidebar (layout lives outside Tailwind scan of first paint). */
.admin-nav-link {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #475569;
}

.admin-nav-link:hover {
  background: #f1f5f9;
  color: #0c4a6e;
}

.admin-nav-link-active,
a.admin-nav-link-active {
  background: #e0f2fe;
  color: #075985;
}

/* BonPlaya custom styles – complements Tailwind */

:root {
  --ocean-900: #0c4a6e;
  --ocean-700: #0369a1;
  --ocean-500: #0ea5e9;
  --sand-100: #fef7ed;
  --sand-200: #fef3c7;
  --coral: #f97316;
}

/* First paint without Tailwind CDN: keep chrome/background from collapsing to unstyled HTML. */
html,
body {
  background-color: #f8fafc; /* slate-50 */
  color: #1e293b; /* slate-800 */
  width: 100%;
  max-width: 100%;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  margin: 0;
}

.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;
}

nav.sticky {
  position: sticky;
  top: 0;
  z-index: 50;
  max-width: 100%;
  min-height: 4rem;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid #e2e8f0;
}

/* Logo + CTA stay visible; wrap instead of widening the page. */
.nav-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 0.75rem;
  min-width: 0;
  width: 100%;
  min-height: 4rem;
  height: auto;
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
}

.nav-actions {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 0.5rem;
  margin-left: auto;
  min-width: 0;
}

@media (min-width: 768px) {
  .nav-links {
    margin-left: 2rem;
  }
}

@media (min-width: 1024px) {
  .nav-links {
    margin-left: 2.5rem;
  }
}

@media (min-width: 640px) {
  .nav-actions {
    gap: 0.75rem;
  }
}

nav .hidden {
  display: none;
}

/* Full “BonPlaya” wordmark — never crop or hide. */
.nav-wordmark {
  display: inline;
  overflow: visible;
  white-space: nowrap;
}

@media (min-width: 640px) {
  nav .sm\:flex {
    display: flex;
  }

  nav .sm\:inline-flex {
    display: inline-flex;
  }

  nav .sm\:inline {
    display: inline;
  }

  nav .sm\:hidden {
    display: none;
  }
}

@media (min-width: 768px) {
  nav .md\:flex {
    display: flex;
  }

  nav .md\:inline-flex {
    display: inline-flex;
  }

  nav .md\:hidden {
    display: none;
  }
}

@media (min-width: 1024px) {
  nav .lg\:flex {
    display: flex;
  }

  nav .lg\:inline-flex {
    display: inline-flex;
  }

  nav .lg\:inline {
    display: inline;
  }
}

@media (min-width: 1280px) {
  nav .xl\:inline {
    display: inline;
  }
}

.aspect-score-bar {
  position: relative;
  height: 2.75rem;
  border: 1px solid #e0f2fe;
  border-radius: 0.75rem;
  background: #fff;
  overflow: hidden;
  cursor: pointer;
}

.aspect-score-bar.is-empty {
  background: #f0f9ff;
  border-color: #bae6fd;
}

.aspect-score-bar:focus {
  outline: none;
}

.aspect-score-bar:focus-visible {
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px #7dd3fc;
}

.aspect-score-bar__fill {
  position: absolute;
  inset: 0 auto 0 0;
  background: linear-gradient(135deg, #0ea5e9, #0369a1);
  transition: width 0.15s ease;
}

.aspect-score-bar__hits {
  position: absolute;
  inset: 0;
  display: flex;
}

.aspect-score-bar__hits button {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-width: 0;
  min-height: 2.75rem;
  padding: 0;
  border: 0;
  border-right: 1px solid #bae6fd;
  background: transparent;
  cursor: pointer;
}

.aspect-score-bar__hits button:last-child {
  border-right: 0;
}

.aspect-score-bar.is-set .aspect-score-bar__hits button {
  border-right-color: rgb(255 255 255 / 0.28);
}

.aspect-score-bar__n {
  position: relative;
  z-index: 1;
  font-size: 0.75rem;
  font-weight: 600;
  color: #0284c7;
  line-height: 1;
  pointer-events: none;
}

.aspect-score-bar__hits button.is-filled .aspect-score-bar__n {
  color: #fff;
  text-shadow: 0 1px 1px rgb(3 105 161 / 0.35);
}

.aspect-score-bar.aspect-score-bar--mini {
  height: 0.5rem;
  pointer-events: none;
  cursor: default;
  border-radius: 9999px;
  background: #f0f9ff;
}

.account-menu-slot {
  display: inline-block;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  background: #e2e8f0;
}

.account-menu {
  position: relative;
}

.account-menu__trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  max-width: 100%;
  padding: 0.2rem 0.5rem 0.2rem 0.2rem;
  border: 1px solid #e2e8f0;
  border-radius: 9999px;
  background: #fff;
  color: #334155;
  cursor: pointer;
  list-style: none;
}

.account-menu__trigger:focus {
  outline: 2px solid #0ea5e9;
  outline-offset: 2px;
}

.account-menu__trigger::-webkit-details-marker {
  display: none;
}

.account-menu__avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  background: #0c4a6e;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.account-menu__name {
  display: none;
  max-width: 9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.8125rem;
  font-weight: 500;
}

@media (min-width: 640px) {
  .account-menu__name {
    display: inline;
  }
}

.account-menu__chevron {
  flex-shrink: 0;
  color: #64748b;
}

.account-menu[open] .account-menu__chevron {
  transform: rotate(180deg);
}

.account-menu__panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.4rem);
  z-index: 60;
  min-width: 14rem;
  padding: 0.4rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.08);
}

.account-menu__who {
  margin: 0;
  padding: 0.4rem 0.75rem 0.55rem;
  font-size: 0.75rem;
  color: #64748b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-bottom: 1px solid #f1f5f9;
  margin-bottom: 0.25rem;
}

.account-menu__panel a {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #475569;
  text-decoration: none;
}

.account-menu__panel a:hover,
.account-menu__panel a:focus {
  background: #f8fafc;
  color: #0c4a6e;
}

.account-menu__panel a.account-menu__admin {
  color: #92400e;
}

.account-menu__panel a.account-menu__admin:hover,
.account-menu__panel a.account-menu__admin:focus {
  background: #fffbeb;
  color: #78350f;
}

.account-menu__panel a.account-menu__logout {
  margin-top: 0.25rem;
  border-top: 1px solid #f1f5f9;
  border-radius: 0 0 0.5rem 0.5rem;
}

/* Pill CTA: never wrap — wrapped text turns rounded-full into a tall oval. */
.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  white-space: nowrap;
  line-height: 1.25;
  padding: 0.5rem 0.75rem;
  background-color: #0369a1;
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: 9999px;
}

@media (max-width: 359px) {
  .nav-cta {
    padding: 0.4rem 0.65rem;
    font-size: 0.75rem;
  }
}

@media (min-width: 640px) {
  .nav-cta {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
  }
}

/* Async loading placeholder — independent of Tailwind so it never FOUCs. */
.page-skeleton {
  max-width: 80rem;
  margin: 0 auto;
  padding: 2.5rem 1rem;
}

.page-skeleton__block {
  background: linear-gradient(90deg, #e2e8f0 20%, #f1f5f9 50%, #e2e8f0 80%);
  background-size: 200% 100%;
  animation: page-skeleton-shimmer 1.2s ease-in-out infinite;
  border-radius: 0.75rem;
}

.page-skeleton__crumb {
  width: 12rem;
  height: 0.75rem;
  margin-bottom: 1rem;
}

.page-skeleton__title {
  width: min(28rem, 80%);
  height: 2rem;
  margin-bottom: 1.25rem;
}

.page-skeleton__line {
  height: 0.85rem;
  margin-bottom: 0.75rem;
}

.page-skeleton__line--short {
  width: 55%;
}

.page-skeleton__hero {
  width: 100%;
  aspect-ratio: 21 / 9;
  margin: 1.5rem 0;
}

.page-skeleton__hero--form {
  aspect-ratio: 16 / 7;
}

.page-skeleton__split {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .page-skeleton__split {
    grid-template-columns: 1fr 18rem;
  }
}

.page-skeleton__aside {
  min-height: 16rem;
}

.page-skeleton__grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .page-skeleton__grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1024px) {
  .page-skeleton__grid {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

.page-skeleton__card {
  min-height: 14rem;
  border-radius: 1rem;
}

.page-skeleton--form .page-skeleton__card {
  max-width: 42rem;
  margin: 0 auto;
  padding: 1.5rem;
  min-height: 22rem;
  background: #fff;
  border: 1px solid #e2e8f0;
}

@keyframes page-skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.hero-gradient {
  width: 100%;
  background: linear-gradient(135deg, #0c4a6e 0%, #0369a1 50%, #0ea5e9 100%);
}

.beach-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.beach-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

/* Soft ocean placeholder when a beach has no approved BeachImage */
.beach-photo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse 80% 60% at 70% 20%, rgba(186, 230, 253, 0.55) 0%, transparent 55%),
    linear-gradient(155deg, #e0f2fe 0%, #bae6fd 38%, #7dd3fc 68%, #38bdf8 100%);
  color: #0369a1;
}

.beach-photo-placeholder__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem;
  text-align: center;
}

.beach-photo-placeholder__icon {
  width: 2.5rem;
  height: 2.5rem;
  opacity: 0.55;
  flex-shrink: 0;
}

.beach-photo-placeholder__label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: #0c4a6e;
  opacity: 0.7;
}

/* Compact thumb (related beaches, review header) */
.beach-photo-placeholder--thumb .beach-photo-placeholder__icon {
  width: 1.35rem;
  height: 1.35rem;
}

/* Wide hero / detail empty state */
.beach-photo-placeholder--wide .beach-photo-placeholder__icon {
  width: 3rem;
  height: 3rem;
}

.beach-photo-placeholder--wide .beach-photo-placeholder__label {
  font-size: 0.875rem;
}

.score-badge {
  background: linear-gradient(135deg, #0ea5e9, #0369a1);
}

.score-badge--soft {
  background: linear-gradient(135deg, #0ea5e9, #0369a1);
}

.review-card {
  border-left: 4px solid #0ea5e9;
}

/* Language switcher */
.lang-btn.active {
  background-color: #0c4a6e;
  color: white;
}

/* Filter chips — flat text/fill, no shadow behind label */
.filter-chip {
  appearance: none;
  -webkit-appearance: none;
  box-shadow: none;
  text-shadow: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-image: none;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.filter-chip.active {
  background-color: #0c4a6e;
  color: white;
  border-color: #0c4a6e;
  box-shadow: none;
  text-shadow: none;
}

/* Inactive activity chips: flat — white fill so gray-on-gray doesn’t look raised */
.filter-chip-idle {
  appearance: none;
  -webkit-appearance: none;
  box-shadow: none !important;
  text-shadow: none !important;
  background-image: none !important;
  filter: none;
  border: 1px solid #e2e8f0; /* slate-200, equal all sides */
  background-color: #ffffff;
  color: #475569; /* slate-600 */
}

.filter-chip-idle:hover {
  box-shadow: none !important;
  background-image: none !important;
  border-color: #cbd5e1; /* slate-300 */
  background-color: #ffffff;
  color: #334155; /* slate-700 */
}

.filter-chip-idle:focus,
.filter-chip-idle:active {
  box-shadow: none !important;
  outline: none;
}

/* Bonaire filter bar: iOS Safari native <select> ignores flex width (min-width: auto + long options). */
.bonaire-toolbar__score,
.bonaire-toolbar__controls {
  min-width: 0;
}

#bonaire-min-score {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23475569' d='M1.2 1.5 6 6.3 10.8 1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.55rem center;
  background-size: 0.7rem;
  padding-right: 1.6rem;
}

/* Smooth scroll */
html {
  scroll-behavior: smooth;
}

/* Blazor circuit error banner (hidden until a real circuit failure) */
#blazor-error-ui {
  background: #b32121;
  bottom: 0;
  box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
  color: #fff;
  display: none;
  left: 0;
  padding: 0.6rem 1.25rem;
  position: fixed;
  width: 100%;
  z-index: 1000;
}

#blazor-error-ui .dismiss {
  cursor: pointer;
  position: absolute;
  right: 0.75rem;
  top: 0.5rem;
}

#blazor-error-ui .reload {
  color: #fff;
  margin-left: 0.5rem;
  text-decoration: underline;
}

/* Mobile menu */
.mobile-menu {
  transition: transform 0.3s ease;
}

/* Blazor form / error helpers */
h1:focus {
  outline: none;
}

.valid.modified:not([type=checkbox]) {
  outline: 1px solid #26b050;
}

.invalid {
  outline: 1px solid #e50000;
}

.validation-message {
  color: #e50000;
}

.blazor-error-boundary {
  background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjb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