/* Jersey Shore Birthdays — base styles
   Shore-boardwalk energy on a clean modern UI.
   Mobile-first; ~390px baseline. */

:root {
  --balloon-red: #ef4444;
  --sky-blue: #2dd4bf;
  --sunshine: #fbbf24;
  --ink: #0f172a;
  --ink-muted: #475569;
  --ink-soft: #94a3b8;
  --paper: #ffffff;
  --paper-soft: #f8fafc;
  --paper-tint: #f1f5f9;
  --border: #e2e8f0;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 20px 60px rgba(15, 23, 42, 0.10);
  --font-display: 'Baloo 2', 'Nunito Black', system-ui, sans-serif;
  --font-body: 'Nunito', system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.5;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(1.8rem, 4vw + 1rem, 3.2rem); }
h2 { font-size: clamp(1.4rem, 2vw + 1rem, 2.2rem); }
h3 { font-size: 1.2rem; }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--balloon-red); }

p { margin: 0 0 1em; }

.muted { color: var(--ink-muted); }
.small { font-size: 0.875rem; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 1rem; }

/* ----- Header ----- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--border);
}
.nav-row { display: flex; align-items: center; justify-content: space-between; padding: 0.75rem 1rem; }
.logo { display: inline-flex; align-items: center; gap: 0.5rem; font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; }
.logo-mark { font-size: 1.5rem; }
.nav-links { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.nav-links a { font-weight: 600; }
.nav-cta {
  background: var(--balloon-red); color: white !important;
  padding: 0.5rem 1rem; border-radius: 999px;
}
.nav-cta:hover { background: #dc2626; color: white !important; }

/* ----- Hero ----- */
.hero {
  background: linear-gradient(135deg, #fef3c7 0%, #ddd6fe 60%, #bfdbfe 100%);
  padding: 4rem 0 5rem;
  text-align: center;
}
.hero h1 { max-width: 14ch; margin: 0 auto 0.5rem; }
.hero-sub { color: var(--ink-muted); font-size: 1.05rem; max-width: 48ch; margin: 0 auto 2rem; }
.hero-search {
  display: flex; gap: 0.5rem; max-width: 540px; margin: 0 auto;
  background: white; padding: 0.4rem; border-radius: 999px; box-shadow: var(--shadow-lg);
}
.hero-search input {
  flex: 1; border: none; padding: 0.75rem 1rem; border-radius: 999px; font-size: 1rem;
  background: transparent; outline: none;
}
.hero-search button {
  background: var(--balloon-red); color: white; border: 0; padding: 0.75rem 1.5rem;
  border-radius: 999px; font-weight: 700; cursor: pointer;
}
.hero-search button:hover { background: #dc2626; }

/* ----- Sections ----- */
.section { padding: 3rem 0; }
.section-head { margin-bottom: 1.5rem; }
.section-head h2 { margin-bottom: 0.25rem; }

/* ----- Category scroller ----- */
.category-scroller {
  display: flex; gap: 0.75rem; overflow-x: auto;
  padding-bottom: 0.5rem; scrollbar-width: thin;
}
.category-pill {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--paper-tint); padding: 0.75rem 1.25rem; border-radius: 999px;
  font-weight: 600;
}
.category-pill:hover { background: var(--sky-blue); color: white; }
.category-pill__icon { font-size: 1.25rem; }

/* ----- Listing cards ----- */
.card-grid {
  display: grid; gap: 1.25rem;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.listing-card {
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.listing-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.listing-card__link { display: block; height: 100%; }
.listing-card__cover {
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #fde68a 0%, #fca5a5 100%);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 3rem; color: rgba(255, 255, 255, 0.8);
  position: relative; overflow: hidden;
}
.listing-card__cover img { width: 100%; height: 100%; object-fit: cover; }
.listing-card__placeholder { user-select: none; }
.listing-card__body { padding: 1rem; }
.listing-card__title { margin: 0 0 0.25rem; font-size: 1.15rem; }
.listing-card__tagline { color: var(--ink-muted); margin: 0 0 0.5rem; font-size: 0.95rem; }
.listing-card__meta { display: flex; gap: 0.75rem; align-items: center; margin-bottom: 0.5rem; }
.listing-card__cats { margin: 0; }
.listing-card__claim {
  margin-top: 0.5rem; color: var(--balloon-red); font-weight: 700;
}

.listing-card--unclaimed { filter: saturate(0.4); position: relative; }
.listing-card--unclaimed::after {
  content: ''; position: absolute; inset: 0;
  background: rgba(248, 250, 252, 0.2); pointer-events: none;
}

.badge {
  position: absolute; top: 0.6rem; left: 0.6rem;
  background: var(--sky-blue); color: white;
  font-size: 0.75rem; font-weight: 700; padding: 0.25rem 0.6rem;
  border-radius: 999px; text-transform: uppercase; letter-spacing: 0.05em;
}
.badge--featured { background: var(--sky-blue); }
.badge--founding { left: auto; right: 0.6rem; background: var(--sunshine); color: var(--ink); }
.badge--count {
  position: static; display: inline-block; margin-left: 0.5rem;
  background: var(--balloon-red); color: white; padding: 0.1rem 0.5rem; font-size: 0.7rem;
}

.stars { color: var(--sunshine); font-weight: 700; }

/* ----- Town grid ----- */
.town-grid { display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.town-tile {
  background: var(--paper-soft); border-radius: var(--radius-sm); padding: 1rem;
  border: 1px solid var(--border);
}
.town-tile:hover { background: var(--sky-blue); color: white; }
.town-tile:hover .muted { color: white; opacity: 0.9; }

/* ----- CTA band ----- */
.cta-band {
  background: linear-gradient(135deg, var(--balloon-red) 0%, #f97316 100%);
  color: white; padding: 3rem 0; text-align: center;
}
.cta-band h2 { color: white; }
.cta-band p { color: rgba(255, 255, 255, 0.9); margin-bottom: 1.5rem; }
.cta-band .btn--primary { background: white; color: var(--balloon-red); }
.cta-band .btn--primary:hover { background: var(--paper-tint); }

/* ----- Buttons ----- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.7rem 1.25rem; border-radius: 999px;
  font-family: var(--font-body); font-weight: 700; font-size: 0.95rem;
  border: 0; cursor: pointer; text-decoration: none;
  transition: background 0.15s ease, transform 0.1s ease;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--balloon-red); color: white; }
.btn--primary:hover { background: #dc2626; color: white; }
.btn--ghost { background: transparent; color: var(--ink); border: 1px solid var(--border); }
.btn--ghost:hover { background: var(--paper-tint); }
.btn--danger { background: #fee2e2; color: #991b1b; }
.btn--sm { padding: 0.35rem 0.75rem; font-size: 0.8rem; }

/* ----- Footer ----- */
.site-footer { background: var(--ink); color: white; padding: 3rem 0 2rem; margin-top: 5rem; }
.site-footer a { color: rgba(255, 255, 255, 0.85); }
.site-footer a:hover { color: white; }
.site-footer .muted { color: rgba(255, 255, 255, 0.7); }
.footer-grid {
  display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-bottom: 2rem;
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 0.4rem; }
.footer-grid h4 { color: white; }

/* ----- Listing detail ----- */
.claim-banner {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-bottom: 2px solid var(--sunshine);
  padding: 1rem 0;
}
.claim-banner .container { display: flex; gap: 1rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }

.listing-hero { padding: 2.5rem 0; background: var(--paper-soft); }
.listing-hero__inner { display: grid; gap: 2rem; grid-template-columns: 1fr 1fr; }
@media (max-width: 720px) { .listing-hero__inner { grid-template-columns: 1fr; } }
.listing-hero__cover {
  aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden;
  background: linear-gradient(135deg, #fde68a 0%, #fca5a5 100%);
  display: flex; align-items: center; justify-content: center;
}
.listing-hero__placeholder { font-family: var(--font-display); font-size: 8rem; color: rgba(255, 255, 255, 0.6); }
.listing-hero__cover img { width: 100%; height: 100%; object-fit: cover; }
.listing-hero__tagline { font-size: 1.1rem; color: var(--ink-muted); }
.listing-hero__cats { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.chip {
  display: inline-block; padding: 0.3rem 0.75rem; background: var(--paper-tint);
  border-radius: 999px; font-size: 0.85rem; font-weight: 600;
}
.listing-hero__rating { font-size: 1.1rem; }

.listing-grid {
  display: grid; gap: 2rem; grid-template-columns: 1fr 320px;
  padding: 2rem 1rem;
}
@media (max-width: 900px) { .listing-grid { grid-template-columns: 1fr; } }
.listing-section { margin-bottom: 2.5rem; }
.photo-grid { display: grid; gap: 0.5rem; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.photo-grid img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: var(--radius-sm); }

.package-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.package-card {
  background: var(--paper-soft); padding: 1.25rem; border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.package-card__price { font-family: var(--font-display); font-size: 1.4rem; color: var(--balloon-red); margin: 0.25rem 0 0.75rem; }
.package-included { padding-left: 1.25rem; margin: 0.5rem 0; }

.faq-list details { background: var(--paper-soft); padding: 1rem 1.25rem; border-radius: var(--radius-sm); margin-bottom: 0.5rem; }
.faq-list summary { cursor: pointer; font-weight: 700; }
.faq-list p { margin: 0.5rem 0 0; }

.reviews { display: flex; flex-direction: column; gap: 1rem; }
.review {
  background: var(--paper-soft); padding: 1rem 1.25rem; border-radius: var(--radius-sm);
  border-left: 4px solid var(--sky-blue);
}
.review header { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; margin-bottom: 0.5rem; }
.business-response { margin-top: 0.75rem; padding-left: 1rem; border-left: 2px solid var(--border); color: var(--ink-muted); }

.listing-side .side-card {
  background: var(--paper); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.25rem; margin-bottom: 1rem; box-shadow: var(--shadow);
}
.side-card--unclaimed { background: var(--paper-soft); }
.redacted { margin: 1rem 0; }
.redacted__line {
  height: 16px; background: var(--ink-soft); border-radius: 4px; margin-bottom: 0.5rem;
  filter: blur(4px);
}
.town-list { padding-left: 1.25rem; margin: 0; }
.inquiry-form label { display: block; margin-bottom: 0.5rem; font-weight: 600; font-size: 0.9rem; }
.inquiry-form input, .inquiry-form textarea, .inquiry-form select {
  width: 100%; padding: 0.5rem; border: 1px solid var(--border); border-radius: 8px;
  font-family: inherit; font-size: 0.95rem;
}

/* ----- Directory ----- */
.directory-hero { padding: 2.5rem 0 1rem; background: var(--paper-soft); }
.directory-grid {
  display: grid; gap: 2rem; grid-template-columns: 240px 1fr;
  padding: 2rem 1rem;
}
@media (max-width: 900px) { .directory-grid { grid-template-columns: 1fr; } }
.directory-filters .filter-block { margin-bottom: 1.5rem; }
.directory-filters ul { list-style: none; padding: 0; margin: 0; }
.directory-filters li { margin-bottom: 0.35rem; }
.directory-intro { max-width: 70ch; }

/* ----- Auth ----- */
.auth-wrap { max-width: 600px; padding: 3rem 1rem; }
.auth-wrap.container { max-width: 720px; }
.form-stack { display: flex; flex-direction: column; gap: 1rem; }
.form-stack label { display: block; font-weight: 600; font-size: 0.9rem; }
.form-stack input, .form-stack textarea, .form-stack select {
  width: 100%; padding: 0.6rem 0.75rem; border: 1px solid var(--border); border-radius: 10px;
  font-family: inherit; font-size: 1rem;
}
.form-stack--wide { max-width: 720px; }
.form-row { display: grid; gap: 1rem; grid-template-columns: 1fr 1fr; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.flash { padding: 0.75rem 1rem; border-radius: var(--radius-sm); margin-bottom: 1rem; }
.flash--success { background: #d1fae5; color: #065f46; }
.flash--error { background: #fee2e2; color: #991b1b; }
.flash--info { background: #dbeafe; color: #1e40af; }

/* ----- Portal layout ----- */
.portal-shell { display: grid; gap: 1.5rem; grid-template-columns: 220px 1fr; padding: 2rem 1rem; }
@media (max-width: 900px) { .portal-shell { grid-template-columns: 1fr; } }
.portal-nav ul { list-style: none; padding: 0; margin: 0; }
.portal-nav li { margin-bottom: 0.25rem; }
.portal-nav a {
  display: block; padding: 0.6rem 0.8rem; border-radius: var(--radius-sm);
  font-weight: 600;
}
.portal-nav a:hover { background: var(--paper-tint); color: var(--ink); }
.portal-nav li.active a { background: var(--ink); color: white; }
.portal-nav--admin li.active a { background: var(--balloon-red); }

.portal-main { min-width: 0; }
.portal-header { margin-bottom: 1.5rem; }
.portal-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-bottom: 2rem; }
.portal-tile {
  background: var(--paper); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.25rem; box-shadow: var(--shadow);
}
.portal-tile.urgent { border-left: 4px solid var(--balloon-red); }
.portal-tile .big-stat { font-family: var(--font-display); font-size: 2.5rem; margin: 0.25rem 0; }
.progress { background: var(--paper-tint); border-radius: 999px; overflow: hidden; height: 12px; margin-bottom: 0.5rem; }
.progress__bar { background: linear-gradient(90deg, var(--sky-blue), var(--balloon-red)); height: 100%; }
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { padding: 0.3rem 0; color: var(--ink-muted); }
.checklist li.done { color: var(--ink); font-weight: 600; }

.portal-section { margin-bottom: 2rem; }
.ai-actions { display: flex; gap: 0.5rem; margin-top: 0.5rem; flex-wrap: wrap; }

/* ----- Tables ----- */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { padding: 0.6rem; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; font-size: 0.9rem; }
.data-table th { background: var(--paper-soft); font-weight: 700; }
.actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.reject-pop { display: inline-block; position: relative; }
.reject-pop[open] .reject-form {
  display: flex; gap: 0.5rem; padding: 0.5rem; background: var(--paper-soft); border-radius: var(--radius-sm); margin-top: 0.25rem;
}
.reject-form { display: none; }
.snapshot { background: var(--paper-tint); padding: 0.5rem; border-radius: 6px; white-space: pre-wrap; font-size: 0.8rem; max-width: 480px; }

/* ----- Featured slot picker ----- */
.featured-table .btn-select {
  padding: 0.4rem 0.6rem; border: 1px solid var(--border); border-radius: 8px;
  margin-right: 0.5rem; background: white; font-family: inherit;
}
.inline-form { display: inline-flex; gap: 0.5rem; align-items: center; }
.inline-form input[type="number"] {
  padding: 0.3rem 0.5rem; border: 1px solid var(--border); border-radius: 8px;
}

.checkbox-row {
  display: flex; gap: 0.5rem; align-items: flex-start;
  padding: 0.5rem 0.75rem; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--paper-soft);
}
.checkbox-row input { margin-top: 0.25rem; }

/* Dispute table: highlight rows due within 3 days */
.urgent-row td { background: #fee2e2; }
.urgent-row td:first-child { border-left: 3px solid var(--balloon-red); }

/* ----- Reviews ----- */
.reviews-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem;
}
.review-foot { margin-top: 0.5rem; }
.link-button {
  background: none; border: 0; padding: 0; cursor: pointer; color: inherit;
  font: inherit; text-decoration: underline; text-underline-offset: 2px;
}
.link-button:hover { color: var(--balloon-red); }
.reviewer-avatar {
  width: 40px; height: 40px; border-radius: 999px; object-fit: cover;
  vertical-align: middle;
}
.reviewer-avatar--sm { width: 24px; height: 24px; }

/* OAuth sign-in card */
.oauth-card {
  background: var(--paper-soft); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem; margin-bottom: 1rem;
}
.oauth-buttons {
  display: flex; gap: 0.75rem; flex-wrap: wrap; margin: 1rem 0;
}
.btn--google {
  background: white; color: var(--ink); border: 1px solid var(--border);
}
.btn--google:hover { background: var(--paper-tint); color: var(--ink); }
.btn--facebook {
  background: #1877f2; color: white;
}
.btn--facebook:hover { background: #155fbf; color: white; }

/* Review form / banner */
.review-form { max-width: 640px; }
.reviewer-banner {
  display: flex; gap: 0.75rem; align-items: center;
  background: var(--paper-soft); padding: 0.75rem 1rem; border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.reviewer-banner p { margin: 0; }

/* Star rating input — radio buttons styled as stars (5 → 1, RTL hover) */
.star-fieldset { border: 0; padding: 0; margin: 0; }
.star-fieldset legend { font-weight: 700; margin-bottom: 0.25rem; }
.star-input {
  display: inline-flex; flex-direction: row-reverse;
  justify-content: flex-end; font-size: 2rem; line-height: 1;
  unicode-bidi: bidi-override;
}
.star-input input[type="radio"] {
  position: absolute; opacity: 0; pointer-events: none;
}
.star-input label {
  cursor: pointer; color: var(--ink-soft); padding: 0 0.1rem;
  transition: color 0.1s ease;
}
.star-input label:hover,
.star-input label:hover ~ label,
.star-input input:checked ~ label {
  color: var(--sunshine);
}
.star-input input:focus-visible + label {
  outline: 2px solid var(--sky-blue); outline-offset: 2px; border-radius: 2px;
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
