/**
 * Pokala Law APC
 * FILE: public/assets/css/site.css
 *
 * PURPOSE
 * Rules that replace behavior the source site produced with JavaScript (jQuery,
 * SmartMenus, and the Elementor front end runtime, all removed in the migration).
 * The visual design itself lives in the stylesheets under assets/css/elementor and
 * assets/vendor; this file must stay small and must never restyle the design.
 *
 * SECTIONS
 * 1. Desktop submenus (opened on hover and keyboard focus, no script needed)
 * 2. Mobile dropdown submenus (opened by site.js)
 * 3. Entrance animations (progressive enhancement)
 * 4. Accessibility helpers
 * 5. Forms (spam trap, error messages, confirmation text colour)
 * 6. Background video and slideshow (elements site.js creates)
 * 7. Audio players (height of the browser's own player)
 * 8. Links in article text (visible; a decision, differs from the source)
 * 9. Phones: headings in article text, long words (a decision, differs from the source)
 *
 * LOAD ORDER
 * Linked last by app/includes/head.php so these rules win over the vendor defaults.
 */

/* 1. Desktop submenus ------------------------------------------------------------
   The vendor stylesheet hides every .sub-menu and relied on a script to show it. */
.elementor-nav-menu--main .elementor-nav-menu li { position: relative; }
/* Width: the vendor stylesheet fixes every submenu at 12em and the source's menu script
   replaced that, when a submenu opened, with the three values below (read from the
   live site in a browser on 2026-11-13). Without them long entries ran out of the box. */
.elementor-nav-menu--main .elementor-nav-menu ul.sub-menu { top: 100%; left: 0; width: auto; min-width: 10em; max-width: 1000px; }
/* A second level opens beside its parent entry, top edges level. The vendor stylesheet
   forces top:100% on every nested list with !important (its script then pulled the list
   back up with a negative margin), so the correction needs !important as well. */
.elementor-nav-menu--main .elementor-nav-menu ul.sub-menu ul.sub-menu { left: 100%; }
.elementor-nav-menu--layout-horizontal .elementor-nav-menu > li ul.sub-menu ul.sub-menu { top: 0 !important; }
.elementor-nav-menu--main .elementor-nav-menu li:hover > ul.sub-menu,
.elementor-nav-menu--main .elementor-nav-menu li:focus-within > ul.sub-menu { display: block; }
.elementor-nav-menu .sub-arrow { display: inline-flex; align-items: center; padding-left: 10px; line-height: 1; }

/* 2. Mobile dropdown submenus ---------------------------------------------------- */
.elementor-nav-menu--dropdown.elementor-nav-menu__container ul.sub-menu { display: none; }
.elementor-nav-menu--dropdown.elementor-nav-menu__container li.pl-open > ul.sub-menu { display: block; }

/* 3. Entrance animations ---------------------------------------------------------
   Content is visible by default. site.js adds .pl-js to <html>, hides elements marked
   .pl-reveal that are below the fold, and reveals them as they scroll into view. */
.pl-js .pl-reveal.pl-pending { visibility: hidden; }
@media (prefers-reduced-motion: reduce) {
  .pl-js .pl-reveal.pl-pending { visibility: visible; }
  .animated { animation: none !important; }
}

/* 4. Accessibility helpers ------------------------------------------------------- */
#content:focus { outline: none; }

/* 5. Forms -----------------------------------------------------------------------
   .ff-hp is the hidden spam trap field. The source site hid it with page level CSS;
   the rule is repeated here so it is hidden on every page that shows a form. */
.ff-hp { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
.pl-form .error.text-danger { color: #b00020; font-size: 0.9em; margin-top: 4px; }
.pl-form-summary { border: 1px solid #b00020; padding: 12px 16px; margin-bottom: 16px; background: #fff; }
/* The source's stylesheet hides .ff-errors-in-stack (its script showed the block when it
   had something to say). Here the server writes the block only when there is something
   to say, so it must be seen. Until 2026-11-14 it was not: a message for the whole form
   ("We could not send your message. Please call ...") reached the page and stayed
   invisible. Found in the browser while checking the error state of the forms. */
.ff-errors-in-stack.pl-form-summary { display: block; }
/* The confirmation box is laid out as a table by the source's stylesheet; a message
   under it landed in the checkbox's 73 px column, one word per line. As the table's
   caption it has the full width. */
.pl-form .ff-el-tc > .error.text-danger { display: table-caption; caption-side: bottom; }
.pl-form-summary ul { margin: 0; padding-left: 20px; color: #b00020; }
/* (The pages have their own colour rule for links, white on the contact page's panel:
   hence the weight. Without it the list was there and could not be read.) */
.pl-form-summary a, .pl-form .pl-form-summary a[href] { color: #b00020 !important; text-decoration: underline; }
.pl-form [aria-invalid="true"] { border-color: #b00020; }

/* The source's form plugin printed this rule into the page itself (its "custom CSS" for
   each form). The form's own colour is white, so without it the sentence beside the
   confirmation checkbox was white on a light panel. Found in the browser, 2026-11-13. */
.fluentform .ff_t_c { color: #000; }
/* The two links in the consent sentence (Privacy Policy, Terms of Use). The pages colour
   every link of the form's column with the theme's white (for example
   ".elementor-14877 ... .elementor-element-populated a"), which left both links white on
   the light panel: not readable. They take the colour of the sentence they stand in, and
   an underline marks them as links. Reported by the administrator on the live contact
   page, 2026-11-16 19:11. */
.pl-form .pl-form-consent a, .pl-form .pl-form-consent a[href],
.pl-lead-consent a, .pl-lead-consent a[href] { color: inherit !important; text-decoration: underline !important; }
.pl-form .pl-form-consent a:hover, .pl-form .pl-form-consent a:focus,
.pl-lead-consent a:hover, .pl-lead-consent a:focus { text-decoration-thickness: 2px !important; }
/* The consent sentence runs over two lines; the form plugin's line height made them touch. */
.pl-form .pl-form-consent .ff_t_c p { line-height: 1.45; }

/* 5a. The added client reviews as a row that moves sideways (app/data/editorial.php,
   'reviews' => 'slider'). The boxes are the page's own; these rules only put them side
   by side. Before the script has started, or without it, the row is moved by hand: it
   scrolls sideways and stops at each box. The script (site.js, Swiper) then takes over. */
.pl-reviews-slider { display: block; position: relative; }
.pl-reviews-slider .pl-reviews-swiper { overflow: hidden; position: relative; }
.pl-reviews-slider .pl-reviews-swiper:not(.swiper-initialized) { overflow-x: auto; scroll-snap-type: x mandatory; }
.pl-reviews-slider .swiper-wrapper { box-sizing: content-box; display: flex; position: relative; width: 100%; z-index: 1; align-items: flex-start; transition-property: transform, height; }
/* (No flex-basis here: the script gives each slide its width, and a basis would win over it.) */
.pl-reviews-slider .swiper-slide { flex-shrink: 0; position: relative; scroll-snap-align: start; width: 100%; }
.pl-reviews-slider .pl-review-card { width: 100%; }
@media (min-width: 768px) {
    .pl-reviews-slider[data-per-view="2"] .pl-reviews-swiper:not(.swiper-initialized) .swiper-slide { width: 50%; }
}
.pl-reviews-nav { align-items: center; display: flex; gap: 16px; justify-content: center; margin-top: 18px; }
.pl-reviews-nav button { align-items: center; background: #0c2e57; border: 0; border-radius: 50%; color: #fff; cursor: pointer; display: inline-flex; font-size: 18px; height: 44px; justify-content: center; padding: 0; width: 44px; }
.pl-reviews-nav button:hover { background: #1b1d21; }
.pl-reviews-nav button:focus-visible { outline: 2px solid #0c2e57; outline-offset: 3px; }
.pl-reviews-nav button[disabled] { cursor: default; opacity: .45; }
.pl-reviews-count { color: #555; font-size: 14px; min-width: 96px; text-align: center; }
.pl-reviews-swiper:not(.swiper-initialized) + .pl-reviews-nav { display: none; }

/* 5b. The line under the client reviews (app/data/editorial.php, 'reviews' => 'note').
   Small, as asked, and still readable: 13 px, contrast 7 to 1 on the page's white. */
.pl-reviews-note { color: #555; font-size: 13px; line-height: 1.5; margin: 24px auto 0; max-width: 1140px; padding: 0 20px; }
.pl-reviews-note a { color: #0c2e57; text-decoration: underline; }
/* The site named under an added review is a link to the original; the page's own rule
   gives links in headings the colour of the text and no line, so it gets one here. */
.pl-reviews-added h6 a { text-decoration: underline; }

/* 6. Background video and slideshow ----------------------------------------------
   site.js sections 5f and 5g. The source's own stylesheets position the containers
   (.elementor-background-video-container, .elementor-background-slideshow) and make
   the picture cover its box; these rules only size the video and stack the slides. */
.elementor-background-video-container > video.pl-bg-video { width: 100%; height: 100%; }
.pl-bg-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 0.5s linear; }
.pl-bg-slide.pl-active { opacity: 1; }

/* 7. Audio players ----------------------------------------------------------------
   The source skinned its audio players with a script (40px tall). The rebuild uses
   the browser's own player, which is taller by default; this keeps the same height
   so the text below an audio article sits where it sits on the source. */
audio.wp-audio-shortcode { display: block; height: 40px; }

/* 8. Links in article text --------------------------------------------------------
   The kit colours every link white (a { color: var(--e-global-color-91f2be4) }).
   Inside the white panel of an article that made the words of a link invisible, on
   the source as well (KNOWN_ISSUES.md KI-022). Decision of the administrator,
   2026-11-14: show them, in the site's own colours. Dark blue is the colour of the
   site's buttons, the lighter blue its primary colour. Buttons inside an article keep
   their own colours. This is a deliberate difference from the source. */
.elementor-widget-theme-post-content a:not(.elementor-button) {
    color: var(--e-global-color-a067682, #0C2E57);
    text-decoration: underline;
}
.elementor-widget-theme-post-content a:not(.elementor-button):hover,
.elementor-widget-theme-post-content a:not(.elementor-button):focus {
    color: var(--e-global-color-primary, #0093D0);
}

/* 9. Phones: headings in article text, long words ----------------------------------
   The kit draws every heading inside an article's text at 60px, at every window
   width (the article's own title is 30px on a phone). On a phone a single word
   such as "Consequences" is then wider than the text column, and the whole page
   scrolls sideways: 49 articles did, on the source as well. Decision of the
   administrator, 2026-11-14 ("fix the phone loading"): on phones these headings are
   sized below the article's title. Wider windows are unchanged.
   The last rule lets a word that is still too long break instead of pushing the
   page wide (titles of cards on the listing pages, long addresses in text). It
   changes nothing where everything fits. */
@media (max-width: 767px) {
    .elementor-widget-theme-post-content h1 { font-size: 28px; line-height: 1.3; }
    .elementor-widget-theme-post-content h2 { font-size: 26px; line-height: 1.3; }
    .elementor-widget-theme-post-content h3 { font-size: 22px; line-height: 1.3; }
    /* The same 60px on the titles of the cards on category, tag, and date pages. */
    .post .entry-title { font-size: 26px; line-height: 1.3; }
}
.elementor-widget-theme-post-content,
.elementor-post__title,
.entry-title,
.elementor-heading-title { overflow-wrap: break-word; }
