/*
 * Fixes for running the 2026-10-19 handoff design layer on this build.
 *
 * menopause-design.css and .js next to this file are the handoff pack's
 * files, copied byte for byte (FLOMURA-Claude-Handoff-2026-10-19, site/visuals).
 * Do not edit them here: put any change for this build in this file, so the
 * pack's files can be compared with, or replaced by, a newer pack.
 *
 * The pack was made on an export of 3883788 (2026-09-17). This build is later
 * and differs in ways the pack could not know about. Each rule below names the
 * difference it answers.
 */

/*
 * Opening picture, option A — owner's choice 2026-10-21 ("เลือกแบบ ก").
 *
 * Since owner review batch 1 (c3f0c6e, 2026-09-22) four openings carry a photo
 * in PageOpening's media slot: /menopause/, hot-flashes, night-sweats and
 * dry-skin. The pack's opening is a two-column grid built for an opening
 * without that slot, so the photo took the right column and the pack's own
 * picture fell to a second row, under the text. The pack's picture is the one
 * kept; the photo is hidden only while the design layer has built the opening
 * (data-visual-ready), so a page without the layer still shows it.
 */
body[data-menopause-design] [data-visual-ready] > [class*="PageOpening"][class*="__media"] {
  display: none;
}

/*
 * Stage cards that link — owner's order 2026-10-21. flomura-overrides.js
 * wraps the stage name in a.fl-stage-link and marks the card .fl-stage-card;
 * the link's ::after covers the whole card, so a tap anywhere on it follows
 * the link while the card's text stays as it was. The arrow says the card
 * goes somewhere; it is decoration, so it has empty alternative text.
 * On /menopause/ the card is a table row (.mp-stage-table tr, already
 * position: relative); on /menopause/perimenopause/ it is .pp-compare-card.
 */
body[data-menopause-design] .fl-stage-card {
  position: relative;
  cursor: pointer;
}
body[data-menopause-design] .fl-stage-link {
  color: inherit;
  text-decoration: none;
}
body[data-menopause-design] .fl-stage-link::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
}
body[data-menopause-design] .fl-stage-link:focus-visible {
  outline: none;
}
body[data-menopause-design] .fl-stage-card:focus-within {
  outline: 2px solid #365b4c;
  outline-offset: 3px;
}
body[data-menopause-design] .fl-stage-card::after {
  content: '→' / '';
  position: absolute;
  top: 22px;
  right: 24px;
  font-size: 20px;
  line-height: 1;
  opacity: 0.55;
}
body[data-menopause-design] .fl-stage-card:hover::after {
  opacity: 1;
}
body[data-menopause-design] .fl-stage-card:hover {
  box-shadow: 0 10px 24px rgb(54 91 76 / 0.14);
}
@media (prefers-reduced-motion: no-preference) {
  body[data-menopause-design] .fl-stage-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }
  body[data-menopause-design] .fl-stage-card::after {
    transition: transform 0.2s ease, opacity 0.2s ease;
  }
  body[data-menopause-design] .fl-stage-card:hover {
    transform: translateY(-2px);
  }
  body[data-menopause-design] .fl-stage-card:hover::after {
    transform: translateX(3px);
  }
}

/*
 * Comparison tables shown open, without the pack's toggle — owner's order
 * 2026-10-21. flomura-overrides.js opens each details.pp-original-table and
 * marks it .fl-table-open; the summary ("ดูตารางเปรียบเทียบแบบเต็ม") is the
 * pack's own label, not page content, and goes.
 */
body[data-menopause-design] details.fl-table-open > summary {
  display: none;
}
/* the table wrapper's top rule ran under the summary; without it, it doubled the box's edge */
body[data-menopause-design] details.fl-table-open > [class*="DataTable"][class*="__wrap"] {
  border-top: 0;
}

/*
 * White text on the dark-green chip lists — owner's order 2026-10-21, all
 * four. On hormone-changes the chips inherited #333 and read at a contrast of
 * 1.7:1 on the green; the other three were an off-white.
 */
body[data-hormones-design] #language li,
body[data-nutrition-design] #start li,
body[data-dry-skin-design] #variation li,
body[data-vaginal-dryness-design] #variation li {
  color: #fff;
}

/*
 * dry-skin: the pack's SKIN BARRIER illustration is removed — owner's order
 * 2026-10-21 ("ลบ visual SKIN BARRIER ... ออกได้เลย"). Its title, legend and
 * note were the pack's own; the section's text is untouched.
 */
body[data-dry-skin-design] .ds-barrier {
  display: none;
}

/*
 * Darker English labels — owner's order 2026-10-21 ("ทำป้ายหัวข้อภาษาอังกฤษให้
 * เข้มขึ้น"). Each keeps the pack's hue, darkened until it reads at 5:1 or
 * more on every light background it sits on (it was 3.1–4.5:1; the bar for
 * small text is 4.5:1). Labels on the dark panels keep the pack's light
 * colours (4.9–6.3:1): those rules name the panel's id and outrank these.
 */
body[data-menopause-design] .mp-eyebrow,
body[data-menopause-design] .mp-section-label {
  color: #556a5d; /* was #698373 */
}
body[data-hot-flashes-design] .mp-eyebrow,
body[data-hot-flashes-design] .mp-section-label {
  color: #815e4b; /* was #9c725b */
}
body[data-menopause-design] .mp-topic-number {
  color: #586d5b; /* was #77917a */
}
body[data-hormones-design] .hm-hero-heading > span {
  color: #586a4e; /* ESTROGEN, was #718764 */
}
body[data-hot-flashes-design] .hf-hero figcaption span {
  color: #7d6046; /* was #967354 */
}
body[data-nutrition-design] .nt-hero figcaption > span {
  color: #58684a; /* was #687b58 */
}
body[data-circadian-design] .cr-hero figcaption > span {
  color: #5b6951; /* was #6b7c5f */
}
body[data-vaginal-dryness-design] .vd-hero figcaption > span {
  color: #57684f; /* was #66795c */
}
body[data-dry-skin-design] .ds-hero figcaption > span {
  color: #546650; /* was #61765c */
}
body[data-sleep-problems-design] .sl-hero figcaption > span {
  color: #536b61; /* was #597267 */
}
