/*
 * Pokala Law APC
 *
 * FILE:
 * public/assets/css/access.css
 *
 * PURPOSE:
 * The style half of the accessibility layer (app/includes/access.php,
 * docs/testing/ACCESSIBILITY-FIXES.md). Loaded only while the layer is on (the
 * preview, or ACCESS=on), after every other stylesheet. The numbers are the finding
 * numbers of docs/testing/ACCESSIBILITY-AUDIT-2026-11-21.md.
 *
 * Every rule starts at body.pl-access (set by the layer), so nothing here can reach a
 * page the layer did not touch. Dark mode (public/assets/css/theme.css) has its own
 * values where a color is set here: the dark stylesheets are generated from the
 * site's other stylesheets and do not know this file.
 */

/* Text for screen readers only (finding 13: the level one heading; finding 20:
   "opens in a new tab"). In the page, read aloud, not drawn. */
.pl-sr-only {
  position: absolute !important;
  width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0, 0, 0, 0); clip-path: inset(50%);
  white-space: nowrap;
}

/* 3. List pages (tag, category, day) and the "not found" page.
   a. The old stylesheet gives every link the color white (.elementor-kit-8529 a);
      on these pages the titles of the articles stand on white: white on white.
   b. The same stylesheet sets the page heading's line height to "72em" (72 times the
      type size: 4,320 px). The heading next to it says 72px, which is what was meant.
      Found while repairing a.: the list began four screens below the header. */
body.pl-access main.site-main .page-header h1.entry-title { line-height: 72px; }
body.pl-access main.site-main .page-content > article.post a,
body.pl-access main.site-main > nav a { color: #102B4B; }
body.pl-access main.site-main .page-content > article.post a:hover,
body.pl-access main.site-main .page-content > article.post a:focus { color: #102B4B; text-decoration: underline; }
html[data-theme="dark"] body.pl-access main.site-main .page-content > article.post a,
html[data-theme="dark"] body.pl-access main.site-main > nav a { color: #e8edf4; }
@media (max-width: 767px) {
  body.pl-access main.site-main .page-header h1.entry-title { font-size: 38px; line-height: 46px; }
}

/* 21 (found on 2026-11-22 while repairing 5). Blocks with an entrance animation that
   start below the window are kept out of sight until they scroll into view
   (public/assets/css/site.css: visibility hidden). A hidden block is also skipped by
   the Tab key and by screen readers: the flip boxes, and whole sections of 22 pages,
   could not be reached by keyboard unless the page had been scrolled there first.
   They are now kept out of sight by being transparent, which leaves them in the
   keyboard order and readable. Moving the focus into one scrolls it into view, and
   that starts its animation. It looks the same. */
body.pl-access .pl-reveal.pl-pending { visibility: visible; opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  body.pl-access .pl-reveal.pl-pending { opacity: 1; }
}

/* 5. Flip boxes. The box turns while the pointer is over it or the box has the
   keyboard focus. The next press of Tab goes to the link on its back face; the old
   stylesheet then turned the box back, and the focus sat on a face nobody could see.
   Now the box stays turned while anything in it has the focus, and both stops are drawn. */
body.pl-access .elementor-flip-box:focus-visible { outline: 3px solid #102B4B; outline-offset: 3px; }
html[data-theme="dark"] body.pl-access .elementor-flip-box:focus-visible { outline-color: #ffffff; }
body.pl-access .elementor-flip-box--effect-flip .elementor-flip-box:focus-within .elementor-flip-box__back { transform: none; }
body.pl-access .elementor-flip-box--effect-flip.elementor-flip-box--direction-up .elementor-flip-box:focus-within .elementor-flip-box__front { transform: rotateX(180deg) rotateY(0); }
body.pl-access .elementor-flip-box--effect-flip.elementor-flip-box--direction-down .elementor-flip-box:focus-within .elementor-flip-box__front { transform: rotateX(-180deg) rotateY(0); }
body.pl-access .elementor-flip-box--effect-flip.elementor-flip-box--direction-left .elementor-flip-box:focus-within .elementor-flip-box__front { transform: rotateX(0) rotateY(-180deg); }
body.pl-access .elementor-flip-box--effect-flip.elementor-flip-box--direction-right .elementor-flip-box:focus-within .elementor-flip-box__front { transform: rotateX(0) rotateY(180deg); }
body.pl-access a.elementor-flip-box__back:focus-visible {
  outline: 3px solid #ffffff; outline-offset: -7px;
  box-shadow: inset 0 0 0 4px #102B4B;
}

/* 4. The button that pauses and plays a background video (public/assets/js/access.js
   makes it). Upper right corner of the video's section, so that it is in view when the
   page opens. */
body.pl-access .pl-video-toggle {
  position: absolute; right: 16px; top: 16px; z-index: 6;
  width: 44px; height: 44px; padding: 0; margin: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: 2px solid #ffffff; border-radius: 50%;
  background: rgba(16, 43, 75, .88); color: #ffffff;
  cursor: pointer; line-height: 1;
}
body.pl-access .pl-video-toggle:hover,
body.pl-access .pl-video-toggle:focus { background: #102B4B; color: #ffffff; border-color: #ffffff; }
body.pl-access .pl-video-toggle:focus-visible { outline: 3px solid #ffffff; outline-offset: 3px; box-shadow: 0 0 0 6px #102B4B; }
body.pl-access .pl-video-toggle svg { width: 16px; height: 16px; fill: currentColor; }
body.pl-access .pl-video-toggle .pl-video-play,
body.pl-access .pl-video-toggle[data-state="paused"] .pl-video-pause { display: none; }
body.pl-access .pl-video-toggle[data-state="paused"] .pl-video-play { display: block; }
body.pl-access .pl-video-toggle[hidden] { display: none; }

/* 10. Contact form: the line under each field was #dadbdd on #fbfbfb, 1.34 to 1.
   #767f8d is 3.9 to 1 there (3 to 1 is asked of the edge of a field). */
body.pl-access form.frm-fluent-form.pl-form .ff-el-form-control { border-bottom-color: #767f8d; }
html[data-theme="dark"] body.pl-access form.frm-fluent-form.pl-form .ff-el-form-control { border-bottom-color: #8b97a8; }

/* 19. Touch targets under 24 px (WCAG 2.2, 2.5.8). */
body.pl-access .pl-lead-check input[type="checkbox"],
body.pl-access form.pl-form input.ff-el-form-check-input { width: 24px; height: 24px; flex: 0 0 24px; }
body.pl-access form.pl-form input.ff-el-form-check-input { margin-right: 8px; vertical-align: middle; }
body.pl-access .elementor-swiper-button { min-width: 24px; min-height: 24px; align-items: center; justify-content: center; }
body.pl-access .elementor-icon-list-item > a { min-height: 24px; }
body.pl-access footer .elementor-element-41df9af0 .elementor-heading-title a { display: inline-block; padding: 4px 0; }
body.pl-access .pl-lead a.pl-lead-reviews,
body.pl-access .pl-lead .pl-lead-consultation a,
body.pl-access .pl-lead .pl-lead-intro a { display: inline-block; padding: 3px 0; }
body.pl-access .pl-hero-call a { display: inline-block; padding: 1px 0; }
/* Left as they are, 22 px high: the telephone and mail links of the icon boxes. Their
   paragraph has a line height of 1.6 px in the old stylesheet (1.6 was meant), so
   giving the link a box of its own collapses it. They stand alone, more than 24 px
   from any other target, which is the spacing exception of 2.5.8. */

/* 6. The transcript of a recording (app/data/transcripts.php). */
body.pl-access .pl-transcript {
  margin: 28px 0 8px; padding: 22px 26px;
  border: 1px solid #c3c9d2; border-radius: 8px; background: #f7f8fa; color: #1b1d21;
}
body.pl-access .pl-transcript h2 { margin: 0 0 12px; font-size: 24px; line-height: 1.3; font-weight: 600; color: #102B4B; }
body.pl-access .pl-transcript p { margin: 0 0 14px; font-size: 16px; line-height: 1.7; color: #1b1d21; }
body.pl-access .pl-transcript p:last-child { margin-bottom: 0; }
body.pl-access .pl-transcript .pl-transcript-note { padding: 10px 14px; border-left: 4px solid #a8540c; background: #fff4e3; color: #5c2c00; }
html[data-theme="dark"] body.pl-access .pl-transcript { border-color: #5b6878; background: #18212d; color: #e8edf4; }
html[data-theme="dark"] body.pl-access .pl-transcript h2 { color: #f2f5f9; }
html[data-theme="dark"] body.pl-access .pl-transcript p { color: #e8edf4; }
html[data-theme="dark"] body.pl-access .pl-transcript .pl-transcript-note { background: #3a2a12; color: #ffe2b8; border-left-color: #e0a04a; }
