/* =========================================================
   crewmixerbrimsby.lat – Global styles
   Light, editorial consumer-guide look (no casino styling)
   Fully responsive: mobile, tablet and desktop
   ========================================================= */

:root {
  --canvas: #F5F6F3;
  --surface: #FFFFFF;
  --ink: #14213D;
  --ink-soft: #3B4A63;
  --ink-muted: #6B7689;
  --brand: #1F5F8B;
  --brand-dark: #174A6D;
  --brand-soft: #E8F0F6;
  --sage: #2F7D62;
  --line: #E3E6EA;
  --radius: 14px;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  background-color: var(--canvas);
  color: var(--ink-soft);
  overflow-x: clip;
  -webkit-tap-highlight-color: rgba(31, 95, 139, 0.12);
}

#root {
  min-width: 0;
  max-width: 100vw;
}

/* Media never overflows its container */
img {
  max-width: 100%;
  height: auto;
}

/* Long words, URLs and domains wrap instead of overflowing on small screens */
h1, h2, h3, h4, p, li, dd, dt, td, th, summary, address, a {
  overflow-wrap: break-word;
  word-wrap: break-word;
}

h1, h2.font-serif, .font-serif {
  letter-spacing: -0.01em;
}

/* Surfaces */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(20, 33, 61, 0.04), 0 4px 16px -8px rgba(20, 33, 61, 0.08);
  min-width: 0;
}

.card-muted {
  background: #FAFAF8;
  border: 1px solid var(--line);
  border-radius: 10px;
  min-width: 0;
}

.card-hover {
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.card-hover:hover {
  border-color: #CBD2DA;
  box-shadow: 0 10px 28px -14px rgba(20, 33, 61, 0.25);
}

.divider {
  height: 1px;
  background: var(--line);
}

/* Buttons */
.btn-primary {
  background: var(--brand);
  color: #FFFFFF;
  border: 1px solid var(--brand);
  transition: background 0.2s ease, border-color 0.2s ease;
}
.btn-primary:hover {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
}

.btn-outline {
  background: #FFFFFF;
  color: var(--ink);
  border: 1px solid #CBD2DA;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}
.btn-outline:hover {
  border-color: var(--brand);
  color: var(--brand);
}

/* 18+ pill */
.age-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 22px;
  min-width: 30px;
  padding: 0 6px;
  border-radius: 999px;
  border: 1.5px solid var(--ink);
  font-size: 10.5px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1;
  flex-shrink: 0;
}

/* Focus visibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 8px;
}

/* Score bars */
.score-track {
  background: #EDEFF2;
  border-radius: 999px;
  height: 6px;
  overflow: hidden;
}
.score-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--brand);
}

/* Tables */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #CBD2DA transparent;
  max-width: 100%;
}
.table-scroll::-webkit-scrollbar { height: 6px; }
.table-scroll::-webkit-scrollbar-thumb { background: #CBD2DA; border-radius: 999px; }

/* FAQ */
details > summary::-webkit-details-marker { display: none; }

/* Legal content typography */
.legal-content h2 {
  color: var(--ink);
  font-family: "Source Serif 4", Georgia, serif;
  font-weight: 700;
  font-size: 1.25rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}
.legal-content p {
  line-height: 1.75;
  margin-bottom: 0.9rem;
}
.legal-content ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem 0;
}
.legal-content li {
  position: relative;
  padding-left: 1.3rem;
  margin-bottom: 0.5rem;
  line-height: 1.7;
}
.legal-content li::before {
  content: "";
  position: absolute;
  left: 0.15rem;
  top: 0.7rem;
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: var(--brand);
}

/* Skip link */
.sr-only-focusable:focus {
  position: fixed !important;
  top: 10px;
  left: 10px;
  width: auto;
  height: auto;
  clip: auto;
  z-index: 100;
}

/* Header dropdown (3-dot menu) */
.dropdown {
  animation: dropIn 0.16s ease-out;
  transform-origin: top right;
  overscroll-behavior: contain;
}
@keyframes dropIn {
  from { opacity: 0; transform: translateY(-4px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Cookie pop-up */
.cookie-pop {
  animation: popUp 0.25s ease-out;
  margin-bottom: env(safe-area-inset-bottom, 0px);
}
.cookie-pop .card {
  overscroll-behavior: contain;
}
@keyframes popUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Safe-area padding for notched devices */
.safe-x {
  padding-left: max(1rem, env(safe-area-inset-left, 0px));
  padding-right: max(1rem, env(safe-area-inset-right, 0px));
}

/* ---------------------------------------------------------
   Responsive refinements
   --------------------------------------------------------- */

/* Very small phones (≤ 359px) */
@media (max-width: 359px) {
  .header-age-pill { display: none; }
  .legal-content h2 { font-size: 1.125rem; }
}

/* Phones */
@media (max-width: 639px) {
  .legal-content h2 { margin-top: 1.5rem; }
  .legal-content p,
  .legal-content li { font-size: 0.95rem; }
}

/* Touch devices: comfortable tap targets */
@media (pointer: coarse) {
  .dropdown a,
  .dropdown button {
    min-height: 40px;
    display: flex;
    align-items: center;
  }
  details > summary {
    min-height: 48px;
  }
}

/* Short landscape phones: keep the cookie pop-up compact */
@media (max-height: 480px) and (orientation: landscape) {
  .cookie-pop {
    left: auto;
    right: 0.75rem;
    width: min(420px, calc(100vw - 1.5rem));
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}