/* ==========================================================================
   FOREIGN THEME ISOLATION -- EVERY DECLARATION HERE IS !important, ON PURPOSE
   ==========================================================================
   This stylesheet is printed into a page that belongs to someone else: the
   active client area template (Lagom, Twenty-One, Six, Nexus, Nexum, or any
   customised theme). Scoping every selector under our own classes is not
   enough on its own -- a template selector using an ID, like
   `#main-body .panel a:hover`, beats ours on specificity, and a template rule
   that is itself !important beats ours outright. So every declaration in this
   file is !important.

   That does NOT change how this file's own rules interact: among !important
   declarations the browser compares specificity and source order exactly as
   it does among normal ones, so hover, focus, dark mode and the media queries
   all still win where they did before.

   EXCEPTIONS -- never add !important to these:
     * custom properties (--x: ...). The Client Area Styling engine prints the
       admin's colours as --{xx}-* values in a later <style> block, and they
       must win by cascade order. Our !important rules READ them through var(),
       so the admin's customisation still applies.
     * anything inside @keyframes. !important there is invalid, and the
       browser silently DROPS the whole declaration.
     * display and opacity. jQuery's .show()/.hide()/.toggle()/.fadeIn()/
       .fadeOut()/.slideUp()/.slideDown() write them as inline styles, and a
       stylesheet !important beats an inline style -- the element would freeze.
     * position / top / right / bottom / left / width on *-cselect-list.
       evePositionCselectList() writes them inline to open the dropdown where
       it belongs.

   EVERY NEW RULE YOU ADD HERE MUST BE !important TOO. A normal declaration in
   an !important sheet silently loses to its neighbours -- it will look like it
   does nothing. The conformance manifest checks this mechanically, with
   tools/css_isolation_check.php in the common reference folder.
   ========================================================================== */

/* 
  DEVELOPER STYLING GUIDELINES & SOPS FOR LAGOM COMPATIBILITY:
  - Never use inline HTML style attributes (style="..."). All styling must be written in the designated CSS files.
  - Always use custom CSS classes prefixed with the module namespace `whmp_eve-` (use this single prefix consistently everywhere — do not mix in a shorter `st-` variant) to prevent styling conflicts.
  - Never use native/built-in theme classes directly. Style custom classes exclusively.
  - Refer to lagom_css_variables.txt for Lagom defined CSS variables. For Lagom styling, use Lagom's CSS variables accordingly.

  ---------------------------------------------------------------------------
  WHERE THE --eve-* VARIABLE REMAPS WENT
  ---------------------------------------------------------------------------
  This file used to open with three hardcoded blocks — `:root`,
  `.lagom-dark-mode` and `.lagom-futuristic` — remapping every --eve-* variable
  onto a Lagom variable. Those are GONE, and must not be reinstated here.

  They now live in whmp_eve_default_style_mappings()['lagom'] (styling.php),
  seeded into the database as the shipped default mapping for Lagom, and
  rendered per-request by whmp_eve_build_style_css() into the <style> block that
  templates/clientarea.tpl prints AFTER this file's <link>. That is what lets an
  admin retune a Lagom colour from the module's "Client Area Customization" tab
  instead of editing CSS — and it is why the generated block has to come last in
  the cascade.

  Practical rules that follow from that:
   - Add or change a variable REMAP in styling.php, never here.
   - A property override that is not a variable (a Lagom-specific margin, a
     dropdown background) still belongs here.
  - For service actions, use proper Font Awesome icons instead of images, enabling dynamic coloring and sizing via CSS.
*/


/* ══════════════════════════════════════════════════════════════════
   §2  BRIDGE VARIABLES — Dark Mode  (.lagom-dark-mode on <body>)
       Applies to: default / modern / depth styles, dark mode.
       Lagom overrides its own CSS variables when this class is
       active; we re-map --eve-* to the same Lagom vars so they
       automatically inherit the dark-mode values. Status/alert
       colours are explicitly set with rgba so they read correctly
       on dark card backgrounds.
══════════════════════════════════════════════════════════════════ */

/* ══════════════════════════════════════════════════════════════════
   §3  BRIDGE VARIABLES — Futuristic Mode  (.lagom-futuristic on <body>)
       Dark-only style. Uses stronger shadows and larger radii to
       emphasise the futuristic aesthetic. Status colours match
       the dark-mode treatment.
══════════════════════════════════════════════════════════════════ */

/* 
==========================================================================
   Responsive Design Breakpoints Guidelines & Overrides for Lagom:
==========================================================================
   SOP Rule: The client area must be designed and styled to show correctly 
   on all viewport sizes (Mobile, Tablet, Laptop, and Big Desktop). 
   Use the media queries below to adjust widths, grids, layouts, and font 
   properties specifically for Lagom compatibility.
*/

/* 1. Mobile Screens (Smartphones, max-width: 576px) */
@media (max-width: 576px) {
  .whmp_eve-actions-boxes {
    justify-content: flex-start !important;
    margin-left: 0 !important;
    gap: 8px !important;
  }
  .whmp_eve-action-box {
    width: calc(50% - 4px) !important;
    height: 100px !important;
  }
  .whmp_eve-action-box i {
    font-size: 26px !important;
  }
  .whmp_eve-info-table th,
  .whmp_eve-info-table td {
    display: block;
    width: 100% !important;
    border-bottom: none !important;
  }
  .whmp_eve-info-table th {
    padding-bottom: 4px !important;
  }
  .whmp_eve-info-table td {
    padding-top: 4px !important;
    border-bottom: 1px solid var(--eve-border-color) !important;
  }
  .whmp_eve-info-table tr:last-child td {
    border-bottom: none !important;
  }
}

/* 2. Tablet Screens (min-width: 577px) and (max-width: 768px) */
@media (min-width: 577px) and (max-width: 768px) {
  .whmp_eve-actions-boxes {
    gap: 12px !important;
  }
  .whmp_eve-action-box {
    width: 105px !important;
    height: 105px !important;
  }
}

/* 3. Laptop/Notebook Screens (min-width: 769px) and (max-width: 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
  .whmp_eve-actions-boxes {
    gap: 16px !important;
  }
  .whmp_eve-action-box {
    width: 110px !important;
    height: 110px !important;
  }
}

/* 4. Large Desktop Displays (min-width: 1025px) */
@media (min-width: 1025px) {
  .whmp_eve-actions-boxes {
    gap: 20px !important;
  }
  .whmp_eve-action-box {
    width: 115px !important;
    height: 115px !important;
  }
}

/* ==========================================================================
   Custom Select Lagom Support (using --dropdown-bg)
   ========================================================================== */
.whmp_eve-wrapper .whmp_eve-cselect-trigger {
  background: var(--eve-input-bg) !important;
  color: var(--eve-text-color) !important;
  border-color: var(--eve-border-color) !important;
}

.whmp_eve-wrapper .whmp_eve-cselect-list {
  background: var(--dropdown-bg) !important;
  border-color: var(--eve-border-color) !important;
  box-shadow: var(--eve-shadow) !important;
}

.whmp_eve-wrapper .whmp_eve-cselect-option {
  color: var(--eve-text-color) !important;
}

.whmp_eve-wrapper .whmp_eve-cselect-option:hover {
  background: var(--eve-hover-bg) !important;
}

.whmp_eve-wrapper .whmp_eve-cselect-option.selected {
  background: var(--eve-primary-color) !important;
  color: var(--btn-primary-color, #ffffff) !important;
}

/* Lagom "Futuristic" style preset — the only two variables that differ from
   plain Lagom: a larger radius and a deeper shadow.
   THE DOUBLED CLASS IS DELIBERATE. `:root` is a pseudo-class, so it has the
   same specificity as a single class; because the generated $eve_css_style block
   is printed AFTER this file, a single `.lagom-futuristic` here would lose the
   source-order tie-break and the preset would silently flatten back to standard
   Lagom. Repeating the class raises specificity to (0,2,0) so it wins regardless
   of source order, and — unlike writing `html.lagom-futuristic` — it does not
   assume which element Lagom puts the class on. */
.lagom-futuristic.lagom-futuristic {
  --eve-radius: var(--border-radius-lg);
  --eve-shadow: var(--ui-block-shadow-lg);
}

/* The verification popup in Futuristic mode. Lagom's block background is translucent there, so
   without Lagom's own blur the page behind shows through the popup and its text overlaps the
   page heading. The same blur and backdrop Lagom gives its own modals. */
.lagom-futuristic.lagom-futuristic .whmp_eve-popup-box {
  background: var(--modal-content-bg) !important;
  -webkit-backdrop-filter: blur(24px) !important;
  backdrop-filter: blur(24px) !important;
}

.lagom-futuristic.lagom-futuristic #whmp_eve_popup.whmp_eve-popup-overlay {
  background: var(--modal-backdrop-bg) !important;
}
