/* 
  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_ft-` (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 --ft-* VARIABLE REMAPS WENT
  ---------------------------------------------------------------------------
  This file used to open with three hardcoded blocks — `:root`,
  `.lagom-dark-mode` and `.lagom-futuristic` — remapping every --ft-* variable
  onto a Lagom variable. Those are GONE, and must not be reinstated here.

  They now live in whmp_ft_default_style_mappings()['lagom'] (styling.php),
  seeded into the database as the shipped default mapping for Lagom, and
  rendered per-request by whmp_ft_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 --ft-* 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_ft-actions-boxes {
    justify-content: flex-start;
    margin-left: 0;
    gap: 8px;
  }
  .whmp_ft-action-box {
    width: calc(50% - 4px);
    height: 100px;
  }
  .whmp_ft-action-box i {
    font-size: 26px;
  }
  .whmp_ft-info-table th,
  .whmp_ft-info-table td {
    display: block;
    width: 100%;
    border-bottom: none;
  }
  .whmp_ft-info-table th {
    padding-bottom: 4px;
  }
  .whmp_ft-info-table td {
    padding-top: 4px;
    border-bottom: 1px solid var(--ft-border-color);
  }
  .whmp_ft-info-table tr:last-child td {
    border-bottom: none;
  }
}

/* 2. Tablet Screens (min-width: 577px) and (max-width: 768px) */
@media (min-width: 577px) and (max-width: 768px) {
  .whmp_ft-actions-boxes {
    gap: 12px;
  }
  .whmp_ft-action-box {
    width: 105px;
    height: 105px;
  }
}

/* 3. Laptop/Notebook Screens (min-width: 769px) and (max-width: 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
  .whmp_ft-actions-boxes {
    gap: 16px;
  }
  .whmp_ft-action-box {
    width: 110px;
    height: 110px;
  }
}

/* 4. Large Desktop Displays (min-width: 1025px) */
@media (min-width: 1025px) {
  .whmp_ft-actions-boxes {
    gap: 20px;
  }
  .whmp_ft-action-box {
    width: 115px;
    height: 115px;
  }
}

/* ==========================================================================
   Custom Select Lagom Support (using --dropdown-bg)
   ========================================================================== */
.whmp_ft-wrapper .whmp_ft-cselect-trigger {
  background: var(--ft-input-bg);
  color: var(--ft-text-color);
  border-color: var(--ft-border-color);
}

.whmp_ft-wrapper .whmp_ft-cselect-list {
  background: var(--dropdown-bg);
  border-color: var(--ft-border-color);
  box-shadow: var(--ft-shadow);
}

.whmp_ft-wrapper .whmp_ft-cselect-option {
  color: var(--ft-text-color);
}

.whmp_ft-wrapper .whmp_ft-cselect-option:hover {
  background: var(--ft-hover-bg);
}

.whmp_ft-wrapper .whmp_ft-cselect-option.selected {
  background: var(--ft-primary-color);
  color: #ffffff;
}

/* 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 $ft_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 {
  --ft-radius: var(--border-radius-lg);
  --ft-shadow: var(--ui-block-shadow-lg);
}

/* ==========================================================================
   Store banner — Lagom
   ==========================================================================
   Lagom's `.package` card is taller and wider than the stock order forms', so
   the ribbon can sit a little further down the corner without eating the plan
   name. Only the geometry differs; the colours still come from the --ft-*
   variables, so a Lagom store with a custom brand colour gets a ribbon in that
   colour without a second mapping.
   ========================================================================== */

.package .whmp_ft-store-banner,
.lagom-package .whmp_ft-store-banner {
    top: 34px;
    right: -26px;
    width: 150px;
}

@media (max-width: 576px) {
    .package .whmp_ft-store-banner,
    .lagom-package .whmp_ft-store-banner {
        top: 28px;
        right: -30px;
        width: 138px;
    }
}
