/* jiami — responsive layer (2026-11-01). Loaded after style.css + fixes.css.
   Desktop (>=1200px) keeps the original look; below that the comparison table becomes stacked cards,
   below 760px the header gets a hamburger menu, full-width buttons and 44px tap targets.
   Roll back: delete this file + mobile.js and the two enqueue lines in functions.php. */

/* ---------- hamburger: hidden on desktop ---------- */
.nav-menu { display: none; }

/* ---------- comparison table, desktop: fit the 866px column without scrolling ---------- */
@media (min-width: 1200px) {
  .table-wrap { overflow-x: visible; }
  table.compare { min-width: 0; width: 100%; font-size: 0.85rem; }
  table.compare th, table.compare td { padding: 0.7rem 0.5rem; }
  table.compare th { font-size: 0.75rem; letter-spacing: 0; text-transform: none; line-height: 1.3; }
  table.compare td.cell-small, table.compare td.cell-welcome { max-width: none; font-size: 0.8rem; }
  table.compare .actions { white-space: normal; min-width: 5.2rem; }
  table.compare .actions .btn { display: block; margin: 0 0 0.35rem; text-align: center; white-space: nowrap; }
  table.compare .actions .btn:last-child { margin-bottom: 0; }
  table.compare .name-cell { gap: 0.45rem; }
  table.compare .chip { white-space: normal; }
}

/* ---------- comparison table -> stacked cards (< 1200px) ---------- */
@media (max-width: 1199.98px) {
  .table-wrap { overflow: visible; border: 0; background: none; border-radius: 0; }
  table.compare, table.compare tbody, table.compare tr, table.compare td { display: block; min-width: 0; width: 100%; }
  table.compare { font-size: 1rem; }
  table.compare thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  table.compare tbody { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
  table.compare tr {
    display: grid; grid-template-columns: 2.25rem minmax(0, 1fr) auto; column-gap: 0.75rem; row-gap: 0.6rem; align-items: center;
    background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow);
  }
  table.compare td { padding: 0; border: 0; text-align: left; }
  table.compare tr:last-child td { border-bottom: 0; }
  table.compare td.rank {
    grid-column: 1; grid-row: 1; width: 2.25rem; height: 2.25rem; border-radius: 50%; background: var(--accent-soft);
    display: flex; align-items: center; justify-content: center; font-size: 0.95rem;
  }
  table.compare td.cell-name { grid-column: 2; grid-row: 1; }
  table.compare td.score-cell { grid-column: 3; grid-row: 1; width: auto; font-size: 1.15rem; text-align: right; }
  table.compare td.cell-welcome {
    order: -1; grid-column: 1 / -1; max-width: none; background: var(--accent-soft); border: 1px solid rgba(247,147,26,.35);
    border-radius: 8px; padding: 0.65rem 0.8rem; font-size: 1rem; font-weight: 600; color: var(--text);
  }
  table.compare td.cell-welcome::before { display: block; margin-bottom: 0.15rem; }
  table.compare td.cell-small {
    grid-column: 1 / -1; display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 0.5rem; align-items: baseline;
    max-width: none; font-size: 0.95rem;
  }
  table.compare td[data-label]::before { content: attr(data-label); color: var(--text-muted); font-size: 0.875rem; font-weight: 400; }
  table.compare td.rank::before, table.compare td.score-cell::before { display: none; }
  table.compare td.actions { order: 9; grid-column: 1 / -1; display: grid; gap: 0.6rem; margin-top: 0.25rem; white-space: normal; }
  table.compare .actions .btn { display: flex; width: 100%; margin: 0; min-height: 48px; font-size: 1rem; padding: 0.6rem 1rem; }
  table.compare .name-link { display: inline-flex; align-items: center; min-height: 44px; font-size: 1.05rem; }
  table.compare .alias { font-size: 0.875rem; }
  table.compare .name-cell { gap: 0.6rem; }
  table.compare .chip { font-size: 0.875rem; }
}
@media (min-width: 640px) and (max-width: 1199.98px) {
  table.compare tbody { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
}

/* ---------- tablet and below (< 960px): bigger touch targets ---------- */
@media (max-width: 959.98px) {
  .subnav a { display: inline-flex; align-items: center; min-height: 44px; }
  .toc-mobile { margin-bottom: 1.5rem; }
  .toc-mobile details { background: transparent; }
  .toc-summary {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 48px; cursor: pointer; list-style: none;
    font-weight: 600; font-size: 1rem; color: var(--text);
  }
  .toc-summary::-webkit-details-marker { display: none; }
  .toc-summary::after { content: ""; width: 0.6rem; height: 0.6rem; border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(45deg); margin-right: 0.25rem; transition: transform .15s; }
  .toc-mobile details[open] .toc-summary::after { transform: rotate(-135deg); }
  .toc-mobile details[open] .toc-summary { margin-bottom: 0.5rem; border-bottom: 1px solid var(--border); }
  .toc-mobile a { display: flex; align-items: center; min-height: 44px; font-size: 1rem; }
}

/* ---------- phones (< 760px) ---------- */
@media (max-width: 759.98px) {
  .container { width: min(100% - 2rem, var(--max)); }

  /* header: slim, sticky, hamburger */
  .header-inner { min-height: 56px; padding: 0.25rem 0; }
  .brand { display: inline-flex; align-items: center; min-height: 44px; font-size: 1.25rem; }
  .header-note { display: none; }
  .nav-menu { display: block; }
  .nav-toggle {
    display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; margin-right: -0.5rem; cursor: pointer;
    list-style: none; border-radius: 10px;
  }
  .nav-toggle::-webkit-details-marker { display: none; }
  .nav-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
  .nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
    display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .15s, background .15s;
  }
  .nav-toggle-bars { position: relative; }
  .nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
  .nav-toggle-bars::before { top: -7px; }
  .nav-toggle-bars::after { top: 7px; }
  .nav-menu[open] .nav-toggle-bars { background: transparent; }
  .nav-menu[open] .nav-toggle-bars::before { top: 0; transform: rotate(45deg); }
  .nav-menu[open] .nav-toggle-bars::after { top: 0; transform: rotate(-45deg); }
  .mobile-nav {
    position: absolute; left: 0; right: 0; top: 100%; background: var(--bg-elevated); border-bottom: 1px solid var(--border);
    box-shadow: 0 12px 24px rgba(0,0,0,.45); padding: 0.25rem 1rem 0.75rem; max-height: calc(100vh - 64px); max-height: calc(100dvh - 64px); overflow-y: auto;
  }
  .mobile-nav a { display: flex; align-items: center; min-height: 48px; padding: 0 0.5rem; color: var(--text); font-size: 1.05rem; border-bottom: 1px solid var(--border); }
  .mobile-nav a.is-current { color: var(--accent); font-weight: 600; }
  .mobile-nav-note { margin: 0.5rem 0.5rem 0; color: var(--text-muted); font-size: 0.875rem; }
  .subnav-main { display: none; }

  /* breadcrumb: tappable */
  .breadcrumb { display: flex; flex-wrap: wrap; align-items: center; padding: 0.25rem 0; font-size: 0.95rem; }
  .breadcrumb a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; padding: 0 0.25rem; }
  .breadcrumb .sep { margin: 0 0.25rem; }
  .breadcrumb .current { display: inline-flex; align-items: center; min-height: 44px; }

  /* filter pills (promotions / player reviews): one swipeable row instead of 5 wrapped rows */
  .subnav { flex-wrap: nowrap; overflow-x: auto; margin-inline: -1rem; padding: 0.25rem 1rem 0.75rem; scroll-snap-type: x proximity; scrollbar-width: none; gap: 0.5rem; }
  .subnav::-webkit-scrollbar { display: none; }
  .subnav a { flex: 0 0 auto; scroll-snap-align: start; padding: 0 1rem; font-size: 0.95rem; white-space: nowrap; }

  /* type and spacing */
  .page-title { font-size: 1.65rem; line-height: 1.3; }
  .section-title { font-size: 1.3rem; }
  section { margin-bottom: 2.25rem; scroll-margin-top: 4.5rem; }
  .disclosure, .meta-row { font-size: 0.95rem; }
  .intro, .section-lead, .review-body, .blurb, .promo-text, .pr-body, .entry-content p, .faq-body,
  .checklist p, .weight-item p, .topic p, .empty-box { font-size: 1rem; }
  .alias, .fact .k, .mini-facts, .score-bar, .related-card .sub, .score-badge small, .highlight-card .score-big small,
  .promo-card .promo-casino, .promo-meta, .pr-head .date, .footer-copy, .footer-links a, .summary-row { font-size: 0.875rem; }
  .mini-facts, .score-bar { font-size: 0.9375rem; }
  .chip, .badge-demo, .code-chip { font-size: 0.875rem; }
  .placeholder { font-size: inherit; }
  .pros h3, .cons h3, .pros h4, .cons h4 { font-size: 1rem; }
  .highlight-card .rank-badge { font-size: 1rem; }
  .highlight-card .score small { font-size: 0.875rem; }
  .highlight-card, .review { padding: 1rem; }
  .highlight-card h3, .review-header h3 { font-size: 1.15rem; }
  .highlight-card h3 a, .review-header h3 a, .promo-card h3 a { display: inline-block; padding: 0.55rem 0; }

  /* buttons: full width, 48px */
  .btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0.6rem 1rem; font-size: 1rem; text-align: center; }
  .btn-row { flex-direction: column; gap: 0.6rem; }
  .btn-row .btn, .promo-actions .btn, p > .btn { width: 100%; }
  p > .btn { display: flex; }
  .promo-actions { flex-direction: column; min-width: 0; gap: 0.6rem; }

  /* review page / cards */
  .casino-hero { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.75rem 1rem; align-items: center; }
  .casino-hero .page-title { grid-column: 2; flex: none; }
  .casino-hero .score-badge { grid-column: 1 / -1; display: flex; align-items: baseline; justify-content: center; gap: 0.75rem; padding: 0.6rem 1rem; }
  .casino-hero .score-badge small { display: inline; }
  .review-header { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  .review-head-logo { width: 100%; }
  .mini-facts .row { grid-template-columns: 6.75rem minmax(0, 1fr); }
  .score-bar { grid-template-columns: 6rem minmax(0, 1fr) 2.25rem; }
  .pros-cons { grid-template-columns: 1fr; }
  .logo-lg { width: 52px; height: 52px; }
  .promo-card { padding: 1rem; grid-template-columns: auto minmax(0, 1fr); }
  .pr-item { padding: 1rem; }
  .pr-head .date { margin-left: 0; }
  .pr-casino { min-height: 44px; font-size: 0.875rem; }
  .pr-casino .logo { font-size: 0.875rem; }
  .promo-card .promo-casino a, .summary-row a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; }
  .related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .related-card { min-height: 64px; font-size: 1rem; }
  .faq summary { min-height: 52px; font-size: 1rem; }
  .weight-item { gap: 0.75rem; }

  /* footer */
  .site-footer { padding: 1.5rem 0; }
  .footer-links { gap: 0 1rem; }
  .footer-links a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; }
}
