/**
 * @mergeTarget
 * @module Src/Components/CustomInput/CustomChoice/DyslexiaModeChoiceItem
 */
import { LisioCSSRules } from "@lisio/lisio-engine";

/**
 * Styles specific to the dyslexia comfort mode-choice item (on top of the
 * real {@link customChoiceItemStyles} it also reuses — see
 * dyslexia-mode-choice-item.ts).
 * @source
 */
const dyslexiaModeChoiceItemStyles: LisioCSSRules = {
  "div.lisio-elements-container.mode-card-title-row": {
    "align-items": "center",
  },
  // The title-row + description wrapper (badge/title above, description
  // below) — elements-container.css.ts's base `.column` rule centers it and
  // adds a 16px gap between the two; this reads better flush and left
  // aligned. Compound selector so it reliably wins over `.column` alone.
  "div.lisio-elements-container.column.mode-card-content": {
    "row-gap": "0",
    "align-items": "flex-start",
    "text-align": "left",
  },
  // custom-text.css.ts bolds every label <p> once the item is checked
  // (`li:has(input:checked) label p.lisio-custom-text`); the description
  // should stay regular weight regardless of selection, so it needs
  // `!important` to win over that rule.
  "li.lisio-custom-choice-item label p.lisio-custom-text.mode-card-description":
    {
      "font-weight": "normal !important",
    },
  // Same look as the "Retour" back button (btn-pill/btn-back/transparent/
  // btn-outline-grey), but pushed to the right instead of the left:
  // button.btn-back sets `margin-right: auto` (flush left); mirror it here
  // with `margin-left: auto` instead. The RGB fields above (.text-input-container,
  // width: 90%, centered) leave a 5% gap on their right edge — match it here
  // so the button's own right edge lines up with theirs.
  "button.lisio-custom-button.btn-back.mode-card-continue-button": {
    "margin-left": "auto",
    "margin-right": "5%",
  },
  // Wraps the inline example SVG (see dyslexia-mode-choice-item.ts) — no
  // pill/background styling needed here anymore, the highlight/colour is
  // already baked into the SVG itself.
  "span.mode-card-badge": {
    display: "inline-flex",
    "align-items": "center",
  },
};

export { dyslexiaModeChoiceItemStyles };
