/* Article detail (single-article.php). Ported from the V1 Revised prototype's article
   reader (PriceTag_Page_Article_Detail.html with v2-article-real.js, article-extras.css
   and the "v2r" rules in v2-desktop.css). Plain CSS so it ships without a theme rebuild. */

.pt-ad { color: #00184a; font-family: "Noto Sans Thai", Arial, Helvetica, sans-serif; max-width: 1120px; margin: 0 auto; }
.pt-ad [hidden] { display: none !important; }

.pt-ad-crumbs { padding: 14px 0 10px; font-size: 13px; color: #687993; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.pt-ad-crumbs a { color: inherit; text-decoration: none; }
.pt-ad-crumbs a:hover { color: #004aeb; text-decoration: underline; }
.pt-ad-crumbs > span:last-child { color: #00184a; }

.pt-ad-kicker { display: inline-flex; background: #fff0d8; color: #8a4d00; border-radius: 20px; padding: 4px 12px; font-size: 12px; font-weight: 700; }
.pt-ad h1 { font-size: 22px; line-height: 1.35; margin: 12px 0; color: #00184a; font-weight: 700; letter-spacing: -.015em; }

/* Byline row with the share buttons on the same line */
.pt-ad-metarow { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; margin: 0 0 18px; }
.pt-ad-meta { display: flex; gap: 6px 14px; flex-wrap: wrap; color: #5a6a82; font-size: 13px; }
.pt-ad-share { display: flex; align-items: center; gap: 6px; flex: none; }
.pt-ad-share-label { font-size: 12px; font-weight: 600; color: #5a6a82; margin-right: 2px; }
.pt-ad-share a,
.pt-ad-share button { display: grid; place-items: center; width: 32px; height: 32px; padding: 6px; border: 1px solid #dce3ef; border-radius: 50%; background: #fff; color: #00184a; cursor: pointer; }
.pt-ad-share a:hover,
.pt-ad-share button:hover { background: #eef4ff; border-color: #004aeb; }
.pt-ad-share svg { width: 18px; height: 18px; display: block; }
.pt-ad-copied { font-size: 11px; color: #004aeb; }

/* Cover and body: on phones the cover sits in a light framed box, as in the prototype */
.pt-ad-hero { margin: 0 0 22px; border-radius: 12px; overflow: hidden; background: #eef3ff; padding: 12px; }
.pt-ad-hero img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: contain; border-radius: 6px; }
.pt-ad-body { color: #2f4059; }
.pt-ad-body p,
.pt-ad-body li { font-size: 16px; line-height: 1.75; }
.pt-ad-body p { margin: 0 0 18px; } /* paragraph gap: 13px too tight, 24px too loose (10 Nov 2026) */
.pt-ad-body ul,
.pt-ad-body ol { padding-left: 22px; margin: 0 0 18px; }
.pt-ad-body li { margin: 0 0 8px; }
.pt-ad-body h2 { font-size: 20px; line-height: 1.4; margin: 30px 0 10px; padding-left: 10px; border-left: 3px solid #fe9300; color: #00184a; font-weight: 700; }
.pt-ad-body h3 { font-size: 17px; margin: 18px 0 6px; color: #00184a; font-weight: 700; }
.pt-ad-body img { max-width: 100%; height: auto; border-radius: 8px; }
/* Tables (11 Nov 2026): a rounded card with a navy header row, soft row stripes,
   no vertical lines; the first column is the row label. Numbers right-aligned.
   On phones each row turns into its own card (labels come from article-detail.js);
   without the script, the table scrolls sideways instead. */
.pt-ad-body .wp-block-table { margin: 22px 0 26px; border: 1px solid #dce3ef; border-radius: 12px; overflow-x: auto; background: #fff; box-shadow: 0 1px 2px rgba(0, 24, 74, .04); }
.pt-ad-body table { border-collapse: separate; border-spacing: 0; width: 100%; margin: 0; font-size: 15px; line-height: 1.65; }
.pt-ad-body .wp-block-table thead { border: 0; }
.pt-ad-body th,
.pt-ad-body td { border: 0; padding: 12px 16px; text-align: left; vertical-align: top; }
.pt-ad-body thead th,
.pt-ad-body thead td { background: #00184a; color: #fff; font-weight: 600; font-size: 14px; white-space: nowrap; }
.pt-ad-body tbody td { border-top: 1px solid #e8edf5; }
.pt-ad-body tbody tr:first-child td { border-top: 0; }
.pt-ad-body tbody tr:nth-child(even) td { background: #f7f9fd; }
.pt-ad-body tbody td:first-child { color: #00184a; font-weight: 600; }
.pt-ad-body tbody td:first-child strong { font-weight: 700; }
.pt-ad-body .has-text-align-right { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pt-ad-body .has-text-align-center { text-align: center; }
.pt-ad-body table a { word-break: break-word; }
.pt-ad-body table code { font-size: 13px; }
@media (max-width: 640px) {
  .pt-ad-body .wp-block-table:not(.pt-ad-stack) table { min-width: 560px; }
  .pt-ad-body .pt-ad-stack { border: 0; border-radius: 0; box-shadow: none; background: none; overflow: visible; }
  .pt-ad-body .pt-ad-stack thead { display: none; }
  .pt-ad-body .pt-ad-stack table,
  .pt-ad-body .pt-ad-stack tbody,
  .pt-ad-body .pt-ad-stack tr,
  .pt-ad-body .pt-ad-stack td { display: block; width: auto; }
  .pt-ad-body .pt-ad-stack tr { margin: 0 0 12px; border: 1px solid #dce3ef; border-radius: 12px; overflow: hidden; background: #fff; }
  .pt-ad-body .pt-ad-stack tbody tr:nth-child(even) td { background: none; }
  .pt-ad-body .pt-ad-stack td { display: grid; grid-template-columns: minmax(0, 38%) 1fr; gap: 12px; padding: 10px 14px; border-top: 1px solid #eef2f8; text-align: left; white-space: normal; }
  .pt-ad-body .pt-ad-stack td.has-text-align-right { text-align: right; }
  .pt-ad-body .pt-ad-stack td::before { content: attr(data-label); color: #6a7891; font-size: 13px; font-weight: 600; line-height: 1.6; text-align: left; }
  .pt-ad-body .pt-ad-stack td:first-child { display: block; padding: 10px 14px; border-top: 0; background: #00184a; color: #fff; }
  .pt-ad-body .pt-ad-stack td:first-child::before { display: block; font-size: 12px; }
  .pt-ad-body .pt-ad-stack tbody tr:nth-child(even) td:first-child { background: #00184a; }
  .pt-ad-body .pt-ad-stack td:first-child::before { color: #ffc94d; }
}
.pt-ad-body a { color: #004aeb; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.pt-ad-body a:hover { text-decoration-thickness: 2px; }

/* Side column: related products, or more from the same topic */
.pt-ad-side { margin: 24px 0 0; padding: 16px 14px; border: 1px solid #dce3ef; border-radius: 12px; background: #fff; align-self: start; }
.pt-ad-side h2 { font-size: 16px; line-height: 1.4; margin: 0 0 4px; padding-left: 10px; border-left: 3px solid #fe9300; font-weight: 700; }
.pt-ad-pcards { display: grid; gap: 10px; margin-top: 12px; }
.pt-ad-pcard { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 10px; align-items: start; padding: 10px; border: 1px solid #dce3ef; border-radius: 12px; background: #fff; color: #00184a; text-decoration: none; }
.pt-ad-pcard:hover { border-color: #004aeb; box-shadow: 0 2px 10px #00184a14; }
.pt-ad-pimg img { display: block; width: 72px; height: 72px; object-fit: contain; border-radius: 10px; background: #f1f5fd; }
.pt-ad-pbody { display: grid; gap: 6px; min-width: 0; }
.pt-ad-pbody b { font-size: 14px; line-height: 1.4; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pt-ad-pshops { display: grid; gap: 2px; }
.pt-ad-poffer { display: grid; grid-template-columns: 16px auto 1fr; align-items: center; gap: 6px; padding: 3px 0; }
.pt-ad-poffer img,
.pt-ad-poffer i { width: 16px; height: 16px; object-fit: contain; }
.pt-ad-pshop { font-size: 11.5px; color: #52647e; }
.pt-ad-poffer strong { justify-self: end; font-size: 15px; font-weight: 700; color: #e07b00; white-space: nowrap; }
.pt-ad-poffer.is-dear strong { font-size: 13px; font-weight: 600; color: #8a96a8; }
.pt-ad-prange { font-size: 11.5px; font-weight: 600; color: #52647e; margin-top: 2px; }
.pt-ad-side-more { list-style: none; margin: 8px 0 0; padding: 0; counter-reset: n; }
.pt-ad-side-more li { counter-increment: n; display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 4px 8px; padding: 10px 0; border-top: 1px solid #eef1f6; }
.pt-ad-side-more li::before { content: counter(n); display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #fff0d8; color: #8a4d00; font-size: 11px; font-weight: 700; }
.pt-ad-side-more a { display: grid; gap: 6px; color: #00184a; text-decoration: none; }
.pt-ad-side-more img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 8px; }
.pt-ad-side-more b { font-size: 13px; line-height: 1.45; }
.pt-ad-side-more a:hover b { color: #004aeb; text-decoration: underline; }

/* About the author */
.pt-ad-author { margin-top: 28px; padding-top: 20px; border-top: 1px solid #dce3ef; }
.pt-ad-author h2 { font-size: 16px; line-height: 1.4; margin: 0 0 14px; padding-left: 10px; border-left: 3px solid #fe9300; font-weight: 700; }
.pt-ad-author-profile { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 14px; align-items: center; }
.pt-ad-author-photo { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; object-fit: cover; background: #eef3fb; color: #004aeb; font-size: 24px; font-weight: 700; }
.pt-ad-author-photo.is-logo { object-fit: contain; padding: 10px; border: 1px solid #dce3ef; background: #fff; }
.pt-ad-author-name { font-size: 15px; margin: 0; font-weight: 700; color: #00184a; }
.pt-ad-author-count { font-size: 12px; color: #52647e; margin: 2px 0 0; }
.pt-ad-author-bio { font-size: 13px; line-height: 1.65; color: #52647e; margin: 6px 0 0; white-space: pre-line; overflow-wrap: anywhere; }

/* More in this topic, read next, all articles */
.pt-ad-more { margin: 22px 0 8px; padding-top: 14px; border-top: 1px solid #e3e8ef; }
.pt-ad-more h2 { font-size: 17px; margin: 0 0 10px; padding-left: 10px; border-left: 3px solid #fe9300; font-weight: 700; }
.pt-ad-more > div { display: grid; grid-template-columns: 1fr; gap: 14px; }
.pt-ad-more a { color: #0b1f44; text-decoration: none; }
.pt-ad-more img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 8px; display: block; }
.pt-ad-more b { display: block; font-size: 14px; line-height: 1.45; margin-top: 6px; }
.pt-ad-more a:hover b { color: #004aeb; text-decoration: underline; }
.pt-ad-next { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 14px; align-items: center; margin: 20px 0 12px; padding: 12px; border: 1px solid #dce3ef; border-radius: 12px; background: #f7f9fd; color: #00184a; text-decoration: none; }
.pt-ad-next:hover { border-color: #004aeb; background: #eef4ff; }
.pt-ad-next img { width: 120px; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 8px; }
.pt-ad-next > span { display: grid; gap: 3px; }
.pt-ad-next small { font-size: 11px; color: #8a4d00; font-weight: 700; }
.pt-ad-next b { font-size: 15px; line-height: 1.45; }
.pt-ad-next em { font-style: normal; font-size: 12px; color: #004aeb; font-weight: 600; }
.pt-ad-all { display: grid; margin-top: 18px; }
.pt-ad-all a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; border: 1px solid #004aeb; border-radius: 8px; padding: 8px 12px; background: #004aeb; color: #fff; text-decoration: none; font-size: 14px; font-weight: 700; }
.pt-ad-all a:hover { background: #003bc0; }

@media (min-width: 641px) {
  .pt-ad-more > div { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  .pt-ad h1 { font-size: 30px; }
  .pt-ad-hero { padding: 0; }
  .pt-ad-hero img { object-fit: cover; border-radius: 0; }
  .pt-ad > :not(.pt-ad-cols) { max-width: 780px; }
  .pt-ad-cols { display: grid; grid-template-columns: minmax(0, 780px) 300px; gap: 32px; align-items: start; }
  /* The side column scrolls with the page; a sticky column taller than the screen
     snaps and jumps under the header. */
  .pt-ad-side { margin: 0; }
}

/* Hover: cards lift a little with a soft shadow, pictures zoom inside their frame,
   titles turn blue with an arrow, so related links invite a click. Off for reduced motion. */
.pt-ad-pcard, .pt-ad-next, .pt-ad-more a, .pt-ad-side-more a { transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, background-color .2s ease; }
.pt-ad-pcard:hover, .pt-ad-next:hover { transform: translateY(-2px); box-shadow: 0 8px 22px #00184a1f; }
.pt-ad-pimg, .pt-ad-more a, .pt-ad-side-more a, .pt-ad-next { overflow: hidden; }
.pt-ad-pimg { display: block; border-radius: 10px; }
.pt-ad-more a > img, .pt-ad-side-more img, .pt-ad-next img, .pt-ad-pimg img { transition: transform .35s ease; }
.pt-ad-pcard:hover .pt-ad-pimg img, .pt-ad-more a:hover > img, .pt-ad-side-more a:hover img, .pt-ad-next:hover img { transform: scale(1.06); }
.pt-ad-pcard:hover b, .pt-ad-next:hover b { color: #004aeb; }
.pt-ad-more b::after, .pt-ad-side-more b::after { content: " →"; display: inline-block; opacity: 0; transform: translateX(-6px); transition: opacity .2s ease, transform .2s ease; color: #004aeb; }
.pt-ad-more a:hover b::after, .pt-ad-side-more a:hover b::after { opacity: 1; transform: translateX(0); }
.pt-ad-pcard::after { content: none; }
.pt-ad-pbody b::after { content: " →"; opacity: 0; transition: opacity .2s ease; color: #004aeb; }
.pt-ad-pcard:hover .pt-ad-pbody b::after { opacity: 1; }
.pt-ad-next em { display: inline-block; transition: transform .2s ease; }
.pt-ad-next:hover em { transform: translateX(4px); }
.pt-ad-body a { transition: color .2s ease, background-color .2s ease, text-decoration-thickness .2s ease; border-radius: 3px; }
.pt-ad-body a:hover { color: #0037b3; background: #eef4ff; text-decoration-thickness: 2px; }
.pt-ad-share a, .pt-ad-share button { transition: transform .2s ease, background-color .2s ease, border-color .2s ease; }
.pt-ad-share a:hover, .pt-ad-share button:hover { transform: translateY(-2px); }
.pt-ad-all a { transition: background-color .2s ease, transform .2s ease; }
.pt-ad-all a:hover { transform: translateY(-1px); }
.pt-ad-crumbs a { transition: color .2s ease; }
@media (prefers-reduced-motion: reduce) {
  .pt-ad *, .pt-ad *::after { transition: none !important; transform: none !important; }
}

/* 16 Nov 2026 (mobile review): a table set to "align centre" in the editor is display: table, width: auto, so with
   the 560px phone minimum it grew past the screen and the whole article page could be dragged sideways (live
   tv-4k-2026 was 708px wide on a 375px phone). Below 1024px such tables are a normal block that scrolls inside,
   and long web addresses in the text wrap. */
@media (max-width: 1023px) {
  .pt-ad-body .wp-block-table.aligncenter,
  .pt-ad-body .wp-block-table.alignleft,
  .pt-ad-body .wp-block-table.alignright { display: block; width: auto; max-width: 100%; float: none; margin-left: 0; margin-right: 0; }
  /* a long address written out in the text (https://lcdtvthailand.com/blog/...) breaks onto the next line */
  .pt-ad-body :is(p, li) a { overflow-wrap: anywhere; }
}
