/* Pattaya Visa Help — global UX enhancements (mobile nav, stubs, link strips) */

/* Collapsible “related links” on small screens */
@media (max-width: 760px) {
  details.pvh-network {
    max-width: 820px;
    margin: 0 auto 1.25rem;
    padding: 0 1rem;
    border: 1px solid rgba(6, 182, 212, 0.25);
    background: rgba(6, 182, 212, 0.06);
    border-radius: 8px;
  }
  details.pvh-network summary {
    cursor: pointer;
    padding: 0.85rem 0;
    font: 600 0.72rem/1 'JetBrains Mono', 'JetBrains Mono Fallback', ui-monospace, monospace;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #06b6d4;
    list-style: none;
  }
  details.pvh-network summary::-webkit-details-marker {
    display: none;
  }
  details.pvh-network:not([open]) .network-context {
    display: none;
  }
  details.pvh-network[open] .network-context {
    margin: 0 0 1rem;
    padding: 0 0 0.5rem;
    border: none;
    background: transparent;
  }
}

@media (min-width: 761px) {
  details.pvh-network summary {
    display: none;
  }
  details.pvh-network {
    border: none;
    background: transparent;
    padding: 0;
    margin: 0;
  }
}

/* Locale stub pages: readable column instead of empty desktop void */
body:has(.locale-stub-banner) header.article-head,
body:has(.locale-stub-banner) main.article-body,
body:has(.locale-stub-banner) .article-body {
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}
body:has(.locale-stub-banner) header.article-head {
  padding-top: 5.5rem;
}
body:has(.locale-stub-banner) .locale-stub-banner {
  max-width: 780px !important;
}

/* Cookie banner stacks above mobile bottom nav */
@media (max-width: 760px) {
  body.pvh-cookie-open:has(.mnav) {
    padding-bottom: calc(7rem + 72px + env(safe-area-inset-bottom, 0px)) !important;
  }
  body.pvh-cookie-open:has(.mnav) #pvh-cookie-banner {
    bottom: calc(56px + env(safe-area-inset-bottom, 0px));
  }
}

/* Fixed bottom nav must never cover tappable content: per-page 72px pads
   undershoot once safe-area inset applies (nav ≈ 60px + inset). */
@media (max-width: 760px) {
  body:has(.mnav):not(.pvh-cookie-open) {
    padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)) !important;
  }
}

/* Read-next cards: single column + tap-friendly on phones */
@media (max-width: 760px) {
  .rn-grid {
    grid-template-columns: 1fr !important;
  }
  .rn-grid .rn {
    min-height: 88px;
    padding: 1.15rem 1rem;
  }
  .rn-grid .rn h3 {
    font-size: 1.05rem;
  }
}

/* Larger tap targets in dense link strips (mobile) */
@media (max-width: 760px) {
  .network-context a {
    display: inline-block;
    padding: 0.35rem 0.15rem;
    min-height: 44px;
    line-height: 1.5;
    vertical-align: middle;
  }
}

/* Header brand + CTA tap area (mobile): WCAG 2.5.8 44px minimum */
@media (max-width: 760px) {
  a.brand,
  .nav a.cta {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
}

/* In-prose links must not rely on color alone (WCAG 1.4.1 / Lighthouse
   link-in-text-block). Nav, cards, buttons, and link strips stay clean. */
main p:not(.network-context) a:not([class]),
main li a:not([class]),
.article-body p a:not([class]),
.article-body li a:not([class]),
.tool-prose p a:not([class]),
.tool-prose li a:not([class]) {
  text-decoration: underline;
  text-decoration-color: rgba(6, 182, 212, 0.45);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
main p:not(.network-context) a:not([class]):hover,
main li a:not([class]):hover,
.article-body p a:not([class]):hover,
.article-body li a:not([class]):hover,
.tool-prose p a:not([class]):hover,
.tool-prose li a:not([class]):hover {
  text-decoration-color: currentColor;
}

/* Mobile section jump when side TOC is hidden (<1400px) */
@media (max-width: 1399px) {
  details.pvh-section-jump {
    max-width: 820px;
    margin: 0 auto 1.25rem;
    padding: 0 1rem;
    border: 1px solid rgba(236, 72, 153, 0.28);
    background: rgba(236, 72, 153, 0.06);
    border-radius: 8px;
  }
  details.pvh-section-jump summary {
    cursor: pointer;
    padding: 0.85rem 0;
    font: 600 0.72rem/1 'JetBrains Mono', 'JetBrains Mono Fallback', ui-monospace, monospace;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #ec4899;
    list-style: none;
  }
  details.pvh-section-jump summary::-webkit-details-marker {
    display: none;
  }
  details.pvh-section-jump nav {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0 0 1rem;
  }
  details.pvh-section-jump nav a {
    display: block;
    padding: 0.55rem 0;
    min-height: 44px;
    line-height: 1.45;
    color: #e5e7eb;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.95rem;
  }
  details.pvh-section-jump nav a:last-child {
    border-bottom: none;
  }
  details.pvh-section-jump:not([open]) nav {
    display: none;
  }
}

@media (min-width: 1400px) {
  details.pvh-section-jump {
    display: none !important;
  }
}

/* Compact locale footer (DTV pilots) */
.pvh-mini-footer {
  max-width: 820px;
  margin: 2.5rem auto 5rem;
  padding: 1.5rem 1.25rem 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
}
.pvh-mini-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1rem;
  margin-bottom: 1rem;
}
.pvh-mini-links a {
  font-size: 0.88rem;
  color: #06b6d4;
  text-decoration: none;
  padding: 0.35rem 0.15rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.pvh-mini-copy {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.45);
  margin: 0;
}

@media (prefers-reduced-motion: reduce) {
  .mq-t {
    animation: none !important;
  }
}

/* Named-author byline in article meta rows (E-E-A-T) */
.article-meta .byline a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(6, 182, 212, 0.45);
  text-underline-offset: 0.16em;
}
.article-meta .byline a:hover {
  color: var(--cyan, #06b6d4);
}
