/* =========================================================================
   Equidam Pricing Widget — scoped port of the legacy stylesheets

   Source files (verbatim, line-for-line):
     public/assets/wordpress-extra/pricing-widget-vda/css/pricing-widget-vda.css
     public/assets/wordpress-extra/pricing-widget-freemium/css/pricing-widget-freemium.css

   Strategy: every legacy rule preserved with original values, ordering, media
   queries, transitions and pseudo-elements. Only changes:
     1. Selectors rewritten to the BEM contract from CONTRACT.md.
     2. The whole sheet scoped under `.eq-pw` so the plugin cannot bleed into
        — or be bled into by — the surrounding WordPress theme.
     3. Body/html/global resets folded into the `.eq-pw` wrapper itself.
     4. Angular Material attributes (`layout="row"`, `flex="75"`, etc.) and
        `md-*` rules translated into equivalent flexbox targeting the new
        templates' DOM.
   ========================================================================= */


/* ------------------------------------------------------------------------ *
 * Wrapper reset (from legacy `body`/`html`/`*` rules)
 * Source: pricing-widget-vda.css L1-L15, pricing-widget-freemium.css L1-L15
 * ------------------------------------------------------------------------ */
.eq-pw {
    /* Legacy body: -webkit-font-smoothing: antialiased; font-family: "Muli". */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: auto;
    font-family: "Muli", sans-serif;
    font-weight: normal;
    /* Legacy: background fully transparent so WP page styles bleed through. */
    background-color: rgb(0 0 0 / 0%);
    height: auto;
    /* Default body color — legacy `p { color: #083b56 }`. */
    color: #083b56;
    line-height: 1.4;
    text-align: left;
}

/* Legacy `*:focus { outline: none }` — scoped to the widget so we don't
   suppress focus rings elsewhere on the host page. */
.eq-pw *:focus {
    outline: none;
}

/* Legacy `box-sizing` was a global Material reset; we apply it just inside
   the widget so descendant width math (padding 24px + flex %) is correct. */
.eq-pw,
.eq-pw *,
.eq-pw *::before,
.eq-pw *::after {
    box-sizing: border-box;
}

/* Reset margin/padding on common descendants to neutralise WP theme rules.
   Specificity stays at 0,1,0 thanks to `:where()` so single-class component
   rules below still win. */
.eq-pw :where(h1, h2, h3, h4, h5, h6, p, ul, ol, li, button, a, input, section, header, div, span) {
    margin: 0;
    padding: 0;
    font-family: inherit;
    line-height: inherit;
    text-decoration: none;
    color: inherit;
    background: none;
    border: 0;
}
.eq-pw :where(ul, ol) {
    list-style: none;
}

/* Equidam's WordPress theme ships a global rule
 *   `ul:not(#menu-header-menu-ii) { margin-left: 38px }`
 * which has specificity (1,0,1) thanks to the ID inside :not(). That beats
 * the zero-specificity `:where()` reset above, so our feature lists pick up
 * the 38px indent and shove the rows off-centre. We can't outrank an ID in
 * specificity without adding one of our own to every list — and we don't
 * want to bake a theme-specific ID into the plugin — so we override with
 * !important scoped tightly to the plugin's own ul/ol elements. Same
 * treatment for padding-left in case the theme adds that next. */
.eq-pw ul,
.eq-pw ol {
    margin-left: 0 !important;
    padding-left: 0 !important;
}
.eq-pw :where(button) {
    cursor: pointer;
    font: inherit;
}

/* Hidden wrapper — render_widget() emits this when the API fetch fails. */
.eq-pw--unavailable { display: none; }


/* ------------------------------------------------------------------------ *
 * Headings / body type — legacy `h1, h4 { font-family: aileron; color: ... }`
 * Source: pricing-widget-vda.css L45-L52
 * ------------------------------------------------------------------------ */
.eq-pw .eq-pw__card-title,
.eq-pw .eq-pw__features-heading {
    font-family: "aileron", sans-serif;
    color: #083b56;
}
.eq-pw .eq-pw__card-subtitle,
.eq-pw .eq-pw__days-row,
.eq-pw .eq-pw__no-cc {
    color: #083b56;
}


/* ------------------------------------------------------------------------ *
 * Currency + total figure
 * Source: vda.css L74-L91, freemium.css L78-L91
 * Legacy `.currency` was the `<span class="md-title currency">` host of the
 * "$" / "US$" label; `.md-display-3` was the big total figure. The new
 * template renders the symbol in `.eq-pw__currency` and the total in
 * `.eq-pw__total`, so the rules port across cleanly.
 * ------------------------------------------------------------------------ */
.eq-pw .eq-pw__currency {
    font-size: 25px;
    font-weight: 600;
    color: rgba(8, 59, 86, .5);
    position: relative;
    /* Nudges the currency symbol up by 1px so its baseline lands flush with
     * the integer's cap height — visually levels the "$" with the big digits
     * rather than floating it just below their tops. */
    top: -1px;
}
.eq-pw .eq-pw__currency-prefix {
    font-size: 20px;
    vertical-align: baseline;
}
/* Legacy `.md-display-3` — 56/50/500 for the big total. */
.eq-pw .eq-pw__total {
    font-size: 56px;
    line-height: 50px;
    font-weight: 500;
    font-family: "aileron", sans-serif;
    color: #083b56;
    margin: 0;
    /* Aileron ships proportional digits — 1's are narrow, 0/8's wide — which
     * reads as irregular letter-spacing in a price. tabular-nums forces all
     * digits to the same advance width so the price stack looks evenly set
     * and doesn't visibly shift width as the date picker changes the total.
     * Inherits down to .eq-pw__total-frac and .eq-pw__total-int. */
    font-variant-numeric: tabular-nums;
}
/* Fractional portion of the price (e.g. ".00", ".45") at half the integer's
 * font-size, baseline-aligned so the dot + cents sit along the bottom of the
 * large number rather than floating up as a superscript. `format_money()`
 * always emits two decimals, so this span is always present on paid cards. */
.eq-pw .eq-pw__total-frac {
    font-size: 28px;
    line-height: 1;
    font-weight: 500;
    /* Baseline alignment puts the smaller text's baseline on the integer's
     * baseline — visually that's "bottom of the line" since the larger
     * digits have their bottom at that same baseline. */
    vertical-align: baseline;
    /* Tiny left nudge keeps the dot from kissing the last integer digit. */
    margin-left: 1px;
}


/* ------------------------------------------------------------------------ *
 * Cards layout (legacy `.widget-card-wrapper` + `.widget-card`)
 * Source VDA: vda.css L89-L100  — gap 60px, padding 20px 30px.
 * Source FT:  freemium.css L93-L111 — gap 3vw, padding 20px 3vw, plus the
 *             `.widget-card.big` lift. Both use `flex: 1 1 0` (FT explicitly,
 *             VDA implicitly through the layout="row" Material attribute).
 *
 * We split the rule into a base (.eq-pw__cards) and a freemium scope
 * (.eq-pw--freemium .eq-pw__cards) so each variant gets its own gap math
 * matching the source.
 * ------------------------------------------------------------------------ */
.eq-pw .eq-pw__cards {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    justify-content: center;
    flex-wrap: wrap;
    gap: 60px;
    padding: 20px 30px;
}
.eq-pw--freemium .eq-pw__cards {
    /* Legacy freemium uses 3vw gap so three cards fit at desktop widths. */
    gap: 3vw;
    padding: 20px 3vw;
}

.eq-pw .eq-pw__card {
    border-radius: 10px;
    background-color: white;
    box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.05);
    max-width: 440px;
    /* Legacy freemium CSS adds `flex: 1 1 0; min-width: 0` so all three
     * cards share width evenly. VDA inherits the same behaviour from the
     * Material `layout="row"` parent. Apply universally — VDA only has two
     * cards so it just centres them. */
    flex: 1 1 0;
    min-width: 0;
    /* Legacy blade carries `style="padding-bottom:30px"` inline on the
     * <section class="widget-card"> — port to CSS so the markup is clean. */
    padding-bottom: 30px;
    /* Need a positioning context for the absolutely-positioned discount row. */
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Free-trial highlighted card — legacy `.widget-card.big`
 * Source: freemium.css L107-L111. Applied to the middle card (Standard,
 * which carries `class: 'dark-blue'` in the FT template), so we key the
 * lift off `.eq-pw--freemium .eq-pw__card--dark-blue`. */
.eq-pw--freemium .eq-pw__card--dark-blue {
    margin: -15px 0px -15px 0px;
    border: 1px solid #27c2ff;
    box-shadow: 0px 5px 15px rgba(39, 194, 255, 0.4);
}


/* ------------------------------------------------------------------------ *
 * Card header (legacy `.widget-card-header`)
 * Source VDA: vda.css L102-L125 (padding 10px 24px 24px 24px, mb 36px).
 * Source FT:  freemium.css L113-L140 (padding 24px 24px 24px 24px, plus
 *             `.dark-blue` adds padding-top: 38px and `.limited` swaps the
 *             background to slate #b0bec5).
 *
 * Both files share the slate default + dark-blue + h2/p styles.
 * The header `<div layout>` in the legacy held the title and the icon side
 * by side (h2 flex="75" + i.icon absolute on the right). Translate as a
 * relative-positioned header with the title constrained to ~75% width.
 * ------------------------------------------------------------------------ */
.eq-pw .eq-pw__card-header {
    color: white;
    background-color: #9aafb9;
    border-radius: 10px 10px 0 0;
    position: relative;
    margin-bottom: 36px;
    /* Unified vertical rhythm across both variants per design feedback —
     * 24px top so the title sits close to the upper edge, 38px bottom so
     * the subtitle has room before the price block. Horizontal 28px is
     * shared with the features block below for a single card-wide gutter. */
    padding: 24px 28px 38px 28px;
    /* Lock every card header to the same min-height so cards line up
     * regardless of subtitle length — applies to VDA (2 cards) and freemium
     * (3 cards) so the price-block tops stay flush. */
    min-height: 190px;
    /* Equidam's WordPress theme ships a desktop-only `header { z-index: 1000;
     * position: relative }` rule (intended for the site nav). Our card
     * uses a `<header class="eq-pw__card-header">` element, so the theme
     * rule promotes the card header into its own stacking context at z:1000
     * — far above the days-row tooltip's z:5, which then renders under the
     * card when it overlaps. Pinning z-index to `auto` here drops the
     * header back into the normal flow so the tooltip wins by document
     * order. Our selector specificity (0,2,0) beats `header` (0,0,1)
     * without needing !important. */
    z-index: auto;
}

/* When a card icon is present, widen the header's right padding by exactly
 * one icon-width (60px) so the title + subtitle can use the full inner area
 * without ever wrapping into the absolutely-positioned glyph. This replaces
 * the legacy `max-width: 75% / 85%` percentage caps on the title/subtitle,
 * which drifted at narrower card widths and let the subtitle slide under the
 * icon on desktop-narrow FT layouts. The icon sits at `right: 32px` (document)
 * or `right: 42px` (align-center-horizontal, map2), so 60px of extra padding
 * leaves a 4-14px gutter between text and icon's left edge — clean. The
 * :has() selector skips this on the Explorer freemium card (no icon), which
 * therefore keeps the full header width for its title. */
.eq-pw .eq-pw__card-header:has(.eq-pw__card-icon) {
    padding-right: 88px;
}
.eq-pw .eq-pw__card-header--dark-blue {
    background-color: #083b56;
}
/* FT paid Standard card uses dark-blue + extra top padding to absorb the
 * -15px card lift. Legacy 38 → pass 1 44 → pass 2 52. */
.eq-pw--freemium .eq-pw__card-header--dark-blue {
    padding-top: 52px;
}
/* Legacy applied a lighter slate (#b0bec5) to the Explorer/free card header,
 * leaving the Benchmarked card on the default slate (#9aafb9) — two visibly
 * different greys side by side. Unified to the default slate per design
 * feedback so all unpaid/non-highlighted headers share one colour. */
.eq-pw .eq-pw__card-header .eq-pw__card-subtitle {
    color: white;
    line-height: 20px;
    margin: 0;
    font-size: 14px;
    /* Legacy used `<p flex="85">` (max-width: 85%) to keep the subtitle clear
     * of the icon. We now reserve that space on the header itself via
     * `padding-right` (see `.eq-pw__card-header:has(.eq-pw__card-icon)`), so
     * the cap is no longer needed and would only truncate the subtitle on
     * the icon-less Explorer card. */
    /* Legacy `.widget-card-header p { margin: 0 }` — keep flush under the h2.
     * In legacy the visible gap between title and subtitle came from Angular
     * Material's body-font rhythm on the h2 (`margin-top: 24.9px`), not from
     * the subtitle. We reproduce that gap on the title (see __card-title). */
}
.eq-pw .eq-pw__card-title {
    font-family: 'aileron', sans-serif;
    font-size: 30px;
    text-transform: uppercase;
    margin-bottom: 0;
    color: white;
    font-weight: 700;
    line-height: 1.1;
    /* Legacy capped the title at `flex="75"` (max-width: 75%) to keep it
     * clear of the icon. The icon's space is now reserved on the header via
     * `padding-right` (see `.eq-pw__card-header:has(.eq-pw__card-icon)`), so
     * the cap is gone and the title can use the full inner width — important
     * for the icon-less Explorer card whose long subtitle/heading was
     * otherwise prematurely wrapped. */
    /* Legacy VDA's <h2> inherited Angular Material's body-font rhythm
     * (margin-top ~24.9px), which pushed the title down inside the 10px-top-
     * padded header. The legacy freemium header already pads the top to
     * 24px or 38px (`.dark-blue` cards), so it explicitly reset h2 margin-top
     * to 0. We mimic both: default to 24px (rounded from 24.9) here, then
     * the FT card-header rule below resets it back to 0 since FT padding
     * already provides the breathing room. */
    margin-top: 24px;
}
/* Free-trial uses padding to push the title down, not h2 margin — the legacy
 * FT stylesheet explicitly set `.widget-card-header h2 { margin-top: 0 }`. */
.eq-pw--freemium .eq-pw__card-title {
    margin-top: 0;
}


/* ------------------------------------------------------------------------ *
 * Card icon glyph
 * Source: vda.css L126-L142, freemium.css L147-L164
 * Legacy used the Linearicons font (`<i class="icon icon-document2">` etc).
 * Per CONTRACT we ship inline SVGs instead — reproducing the same three
 * glyphs (document, two-row align, folded map) at the same 60px size and
 * absolute positions. Each glyph keeps its legacy `top` / `right` offset so
 * it lands in the same spot as the original.
 * ------------------------------------------------------------------------ */
.eq-pw .eq-pw__card-icon {
    /* Legacy `.icon { font-size: 60px }` — we use width/height since the SVG
     * is a background image, not a glyph. */
    position: absolute;
    width: 60px;
    height: 60px;
    color: #ffffff;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}
.eq-pw .eq-pw__card-icon--icon-document2 {
    /* Legacy `.icon.icon-document2 { top: 37px; right: 32px }`. */
    top: 37px;
    right: 32px;
    /* Document glyph reproduced from the linearicons `lnr-document2`: a thin
     * outlined sheet with a folded top-right corner and three stacked text
     * lines. Stroke 2.5px to read at 60px against the dark-blue header. */
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 32 32' fill='none' stroke='white' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'><path d='M21 3 H7 a1 1 0 0 0 -1 1 v24 a1 1 0 0 0 1 1 h18 a1 1 0 0 0 1 -1 V8 z'/><polyline points='21,3 21,8 26,8'/><line x1='10' y1='14' x2='22' y2='14'/><line x1='10' y1='18' x2='22' y2='18'/><line x1='10' y1='22' x2='18' y2='22'/></svg>");
}
.eq-pw .eq-pw__card-icon--icon-align-center-horizontal {
    /* Legacy `.icon.icon-align-center-horizontal { top: 40px; right: 42px }`. */
    top: 40px;
    right: 42px;
    /* Linearicons `lnr-align-center-horizontal`: a vertical centerline with
     * three horizontal bars of decreasing length stacked on it — the
     * "benchmarking" / horizontal-alignment glyph. Reproduced here in
     * stroke style at 60px. */
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 32 32' fill='none' stroke='white' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'><line x1='16' y1='2' x2='16' y2='30'/><rect x='4' y='6' width='24' height='5' rx='1'/><rect x='8' y='13.5' width='16' height='5' rx='1'/><rect x='6' y='21' width='20' height='5' rx='1'/></svg>");
}
.eq-pw .eq-pw__card-icon--icon-map2 {
    /* Legacy `.icon.icon-map2 { top: 37px; right: 42px }` (freemium only). */
    top: 37px;
    right: 42px;
    /* Linearicons `lnr-map2`: a folded map with two creases. Reproduced as a
     * three-panel zigzag with vertical fold lines. */
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 32 32' fill='none' stroke='white' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'><path d='M3 7 L11 5 L21 8 L29 5 L29 25 L21 28 L11 25 L3 28 Z'/><line x1='11' y1='5' x2='11' y2='25'/><line x1='21' y1='8' x2='21' y2='28'/></svg>");
}


/* ------------------------------------------------------------------------ *
 * Price block — discount strikethrough + pill, total row, days row
 * Source: vda.css L238-L283 + L296-L309, freemium.css L298-L318 + L332-L345
 *
 * Legacy DOM was a flex column inside the card body:
 *   <div layout="column" layout-align="center center">
 *     <div layout="row" class="discount-container-abs"> strikethrough + pill
 *     <div layout> currency + total + excl. VAT
 *     <div class="widget-calendar-toggler"> days link + tooltip + datepicker
 *     <md-button class="eq-button"> CTA
 *     <div ... class="widget-card-body"> features
 *
 * The new templates wrap all of that under `.eq-pw__price-block`. We keep
 * the column layout, centre alignment, and put the discount block at the
 * top with `position: absolute; top: -27px` exactly like legacy.
 * ------------------------------------------------------------------------ */
.eq-pw .eq-pw__price-block {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    /* Pass 2 design bump: extra horizontal + bottom breathing room around
     * the price + days + CTA stack. Legacy block had no padding and relied
     * on per-row margins; the additional outer padding keeps the price
     * elements from feeling crammed against the card edges. */
    padding: 6px 16px 18px 16px;
}

/* Discount strikethrough + pill, legacy `.discount-container-abs`.
 * Source: vda.css L238-L246, freemium.css L298-L307. */
.eq-pw .eq-pw__discount {
    position: absolute;
    top: -27px;
    /* Legacy parent was `<div layout="row">` — translate to a flex row. */
    display: flex;
    flex-direction: row;
    align-items: center;
}
.eq-pw .eq-pw__discount[hidden] {
    display: none;
}
/* Legacy `.text-50-black { color: rgba(0, 0, 0, 0.5) }` + `.second-discount
 * { text-decoration: line-through; font-size: 20px; margin: 0 }`. */
.eq-pw .eq-pw__discount-original {
    color: rgba(0, 0, 0, 0.5);
    text-decoration: line-through;
    font-size: 20px;
    margin: 0;
    /* Same fixed-width digits as the main total — keeps the strikethrough
     * price visually consistent with the figure beneath it. */
    font-variant-numeric: tabular-nums;
}
/* Dark-blue pill next to the strikethrough showing "X% discount". Sizing
 * bumped over the legacy `.rounded-pill-dark-blue` values per design
 * feedback — more horizontal padding (8px instead of 4px) so the percent
 * text doesn't crowd the edges, 20px height so the pill aligns visually
 * with the larger strikethrough digits, and an explicit 3px border-radius
 * so the corners read as "pill-ish" rather than a hard rectangle. */
.eq-pw .eq-pw__discount-pill {
    padding: 3px 8px;
    height: 20px;
    font-size: 12px;
    text-align: center;
    background-color: #083b56;
    color: white;
    margin: 0;
    margin-left: 10px;
    margin-top: 2px;
    border-radius: 3px;
}

/* Currency + total + VAT note. Legacy DOM was an inline flex `<div layout>`
 * with the `.currency` span inline-relative to the `.md-display-3` <p>. */
.eq-pw .eq-pw__price-row {
    /* Legacy was an inline `<div layout>` (= layout-row) with the currency
     * span first, then the big-number <p>. */
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: center;
}
/* "excl. VAT" inline note — legacy used inline style on a span:
 *   font-size: 12px; color: #6b7280; font-weight: 600; margin-top: 32px.
 * Match exactly. */
.eq-pw .eq-pw__vat-note {
    font-size: 12px;
    color: #6b7280;
    font-weight: 600;
    margin-top: 32px;
    align-self: flex-start;
    margin-left: 4px;
}


/* ------------------------------------------------------------------------ *
 * Days row + datepicker
 * Source: vda.css L146-L148, L301-L309, plus legacy inline styles in the
 *         pricing_widget_vda.blade.php / pricing_widget_freemium.blade.php
 *         on the `<a>` and `<md-icon>` for pencil + info-icon glyphs.
 *
 * Legacy markup:
 *   <p class="widget-days" ng-click="openDatePicker(...)">
 *     With access for <a style="color:#083b56; text-decoration:underline">
 *       <b>2 months</a><md-icon class="icon-pencil" ...></md-icon></b>
 *     <md-icon md-svg-src="info-icon.svg" class="s24 info-icon-tooltip">
 *       <md-tooltip class="eq-tooltip-pricing">…</md-tooltip>
 *     </md-icon>
 *   </p>
 *   <md-datepicker ... position: absolute />
 *
 * We replace the <a> with a <button> in the new template (showPicker() is
 * cleaner than mocking md-datepicker), but the visual contract is the same:
 * underlined dark-blue value, pencil glyph after the value, info-icon with
 * tooltip after the whole row.
 * ------------------------------------------------------------------------ */
.eq-pw .eq-pw__days-row {
    /* Legacy `.widget-days { font-size: 14px }`. */
    font-size: 14px;
    color: #083b56;
    /* Legacy VDA's `.widget-days` <p> had Material body-rhythm margins
     * (~14px top + bottom), which gave breathing room between the price
     * number above and the CTA below. The freemium calendar-toggler
     * variant overrode the bottom to 10px. We keep 14px on top universally
     * and let the FT scope below trim the bottom to 10px. */
    margin-top: 14px;
    margin-bottom: 14px;
    position: relative;
    line-height: 1.4;
    /* Legacy `[ng-click] { cursor: pointer }` — only the inner button is
     * clickable in the new markup, so leave the row at default cursor. */
}
/* FT's `.widget-calendar-toggler .widget-days { margin-bottom: 10px }`. */
.eq-pw--freemium .eq-pw__days-row {
    margin-bottom: 10px;
}
/* The <button> wrapping the days value. Legacy was an <a> with inline style
 * `color: #083b56; text-decoration: underline`. Mirror that exactly. */
.eq-pw .eq-pw__days-button {
    color: #083b56;
    text-decoration: underline;
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
}
.eq-pw .eq-pw__days-value {
    /* Inner span — keeps the underline and bold even when JS swaps the text. */
    text-decoration: underline;
    font-weight: 700;
}
/* Pencil glyph after the days value — legacy used <md-icon class="icon-pencil"
 * style="line-height:20px; font-weight:600; font-size:12px; color:#083b56">.
 * Reproduce as a unicode character ::after on the button. */
.eq-pw .eq-pw__days-button::after {
    content: "\270E"; /* ✎ */
    margin-left: 4px;
    font-size: 12px;
    font-weight: 600;
    line-height: 20px;
    color: #083b56;
    text-decoration: none;
    display: inline-block;
}
/* The standalone "i" info glyph after the days row was dropped — the
 * tooltip already opens on hover of the days row itself, so the redundant
 * marker added visual noise. Discoverability is preserved through the
 * underlined "X months" link + cursor change on hover. */

/* The native <input type="date"> stand-in for legacy <md-datepicker>. Legacy
 * did `display: none !important` on `.md-datepicker-input` and
 * `.md-datepicker-triangle-button`, then JS opened the picker on click of
 * the visible link. Native <input type=date> only opens via `showPicker()`
 * (Chrome/Safari) — we hide visually but stay focusable for accessibility. */
.eq-pw .eq-pw__date-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
    opacity: 0;
    pointer-events: none;
}


/* ------------------------------------------------------------------------ *
 * CTA button (legacy `.eq-button` / `md-button`)
 * Source VDA: vda.css L167-L194 (cyan #27c2ff, white text, aileron 16/700,
 *             5px radius, 16px 30px padding, mt:14 mb:10).
 * Source FT:  freemium.css L189-L233 — adds `.transparent` outline variant
 *             for the freemium card and the hover swap.
 * Legacy `.md-button:not([disabled]):hover` was a Material override; we
 * mirror it on `:hover` of the BEM CTA.
 * ------------------------------------------------------------------------ */
.eq-pw .eq-pw__cta {
    font-family: "aileron", sans-serif;
    text-transform: uppercase;
    font-size: 16px;
    letter-spacing: 0.05em;
    border-radius: 5px;
    min-width: 42px;
    background-color: #27c2ff;
    color: white;
    font-weight: bold;
    padding: 16px 30px;
    /* Legacy md-button base style adds 8px horizontal margin to every button,
     * which insets the CTA from the card edge. Keep it so the button doesn't
     * touch the card boundary. */
    margin: 14px 8px 10px 8px;
    /* Legacy used `display: inherit` on the md-button which meant block-level
     * since the parent was a flex column. Use inline-block so the link is
     * sized to its content but still flex-centered. */
    display: inline-block;
    text-align: center;
    border: 1.5px solid transparent;
    cursor: pointer;
    /* Match Angular Material 1.x's md-button transition exactly — the legacy
     * iframe widgets used the framework default, and the 0.15s/ease replacement
     * felt snappy and abrupt compared to the slower, smoother Material curve
     * the rest of the Equidam UI still uses. The curve below is verbatim from
     * `md-button` in Material 1.1.x:
     *   transition: box-shadow .4s cubic-bezier(.25,.8,.25,.2),
     *               background-color .4s cubic-bezier(.25,.8,.25,.2);
     * We add `color` to the transition list so the transparent variant's
     * dark-blue → white text swap on hover eases at the same pace as the
     * background. */
    transition: background-color 0.4s cubic-bezier(0.25, 0.8, 0.25, 0.2),
                color 0.4s cubic-bezier(0.25, 0.8, 0.25, 0.2),
                box-shadow 0.4s cubic-bezier(0.25, 0.8, 0.25, 0.2);
}
/* Hover state — bumped to the legacy cyan AND now adds a matching cyan
 * border so the change is visible against the base cyan background, which
 * was almost imperceptible before. `!important` is necessary because the
 * Equidam WordPress theme defines its own `a:hover`/button-hover rules
 * with higher specificity than the plugin's `.eq-pw .eq-pw__cta` scope,
 * and would otherwise repaint the CTA on hover. Both the solid and the
 * transparent variant share these hover values — see the
 * `--transparent:hover` rule below for the colour-on-text override. */
.eq-pw .eq-pw__cta:hover,
.eq-pw .eq-pw__cta:focus-visible {
    background-color: #48cbff !important;
    border-color: #48cbff !important;
    /* `!important` is required because the Uncode-family WordPress theme
     * ships a high-specificity rule (e.g. `.style-light a:not(.btn-text-skin):hover
     * { color: #27c2ff }`) that paints any non-skinned <a>'s hover text
     * cyan — invisible against our cyan CTA background. Our scoped
     * `.eq-pw .eq-pw__cta:hover` is specificity (0,2,1); the theme's
     * `.style-light a:not(.btn-text-skin):hover` is (0,3,1), so without
     * !important the theme wins and the label disappears on hover. */
    color: white !important;
}

/* `.eq-button.transparent` — outline variant used by the freemium card.
 * Source: freemium.css L205-L209. */
.eq-pw .eq-pw__cta--transparent {
    background-color: transparent;
    border: 1.5px solid #083b56;
    color: #083b56;
}
/* Transparent (Explorer) CTA hover — overrides legacy dark-blue swap with
 * the same cyan as the solid CTA so both buttons share one hover identity.
 * The solid CTA's hover rule above already sets bg + border-color + color
 * with !important; here we only need the transparent variant to follow the
 * same colour treatment (its base text colour is dark-blue, so we explicitly
 * pin it to white on hover to stay legible against the cyan background). */
.eq-pw .eq-pw__cta--transparent:hover,
.eq-pw .eq-pw__cta--transparent:focus-visible {
    background-color: #48cbff !important;
    border-color: #48cbff !important;
    color: white !important;
}

/* "NO CREDIT CARD REQUIRED" tiny note under the freemium CTA.
 * Source: freemium.css L62-L65 (`.no-credit-card { font-size: 10px;
 * margin-top: 0 }`) + the inline `.text-50-black` class. */
.eq-pw .eq-pw__no-cc {
    font-size: 10px;
    margin-top: 0;
    color: rgba(0, 0, 0, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    text-align: center;
}


/* ------------------------------------------------------------------------ *
 * Features list (legacy `.feature-description` / `.feature-with-tooltip`)
 * Source VDA: vda.css L149-L163, freemium.css L171-L185
 * Legacy DOM:
 *   <div class="widget-card-body" layout="column" layout-align="center start">
 *     <h4>Includes:</h4>
 *     <div layout class="feature-description"
 *          ng-class="{'feature-with-tooltip': feature.tooltip}">
 *       <md-icon md-svg-src="done-icon-savebar.svg" class="s19">
 *       <p layout-margin>Feature text</p>
 *       <md-tooltip>…</md-tooltip>
 *     </div>
 *
 * Free-trial also has disabled rows with `not-done-icon-savebar.svg` (red ✕)
 * and the `.disabled` class for strikethrough.
 * ------------------------------------------------------------------------ */
.eq-pw .eq-pw__features {
    /* Legacy DOM: <div class="widget-card-body" layout="column"
     * layout-align="center start" layout-padding>. Material's `layout-padding`
     * adds 8px of padding to the element itself; the inner `.feature-description`
     * rows then add another `padding: 2px 8px`, so text starts ~16px from the
     * card edge. Bumped the horizontal padding to 28px to align the features
     * block with the card header's 28px side padding — gives a single vertical
     * gutter down the whole card instead of the legacy 16px / 28px step. */
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 8px 28px;
}
/* Legacy freemium only: `.widget-card-body { margin-bottom: 28px }` adds
 * breathing room above the card's `padding-bottom: 30px`. VDA legacy had no
 * such rule, so don't apply it there. */
.eq-pw--freemium .eq-pw__features {
    margin-bottom: 28px;
}
.eq-pw .eq-pw__features-heading {
    /* Legacy <h4 style="margin-bottom: 3px; margin-top: 0"> — aileron, dark
     * blue (inherits from the .eq-pw heading rule above). */
    font-family: "aileron", sans-serif;
    color: #083b56;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 3px;
    margin-top: 0;
}
.eq-pw .eq-pw__features-list {
    /* Stack rows vertically. */
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
}
/* Legacy `.feature-description`. */
.eq-pw .eq-pw__feature {
    font-size: 15px;
    line-height: 15px;
    padding: 2px 8px;
    /* Legacy was `<div layout layout-align="center center">` — flex row,
     * vertical-center the icon next to the multi-line text. */
    display: flex;
    flex-direction: row;
    align-items: center;
    /* Per-feature row spacing — legacy DOM nested a `<p layout-margin>` inside
     * each row, which Angular Material rendered as 8px top+bottom margin on
     * the inner <p>. The new template ditches the inner <p>, so we lift that
     * 8px onto the row itself to keep the same vertical rhythm. */
    margin: 8px 0;
    position: relative;
    cursor: default;
    border-radius: 4px;
}
/* Feature rows no longer carry tooltips, so the legacy `cursor: help` +
 * hover-wash rules were removed alongside the tooltip itself — there's no
 * action to hint at on hover, and leaving the wash made non-interactive
 * rows look clickable. */
/* Feature text <p> — legacy `<p layout-margin>` had Material 8px horizontal
 * padding. The check icon sits to the left, text grows to fill. */
.eq-pw .eq-pw__feature-text {
    flex: 1 1 auto;
    margin: 0 8px;
    color: #083b56;
}

/* Feature icon — legacy `<md-icon md-svg-src="done-icon-savebar.svg"
 * class="no-margin s19">` (19px square teal-green check). We render the
 * same SVG inline as a CSS background so we don't need an HTTP fetch per
 * card. The colour matches done-icon-savebar.svg verbatim (#00FFC0). */
.eq-pw .eq-pw__feature-icon {
    flex: 0 0 19px;
    width: 19px;
    height: 19px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    /* Inline SVG copy of public/images/in-templates/done-icon-savebar.svg —
     * keeps the plugin self-contained (no hotlinks back to app.equidam.com). */
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='13' viewBox='0 0 16 13'><path fill='%2300FFC0' fill-rule='nonzero' d='M13.136.591c.542-.667 1.548-.788 2.245-.27.698.519.825 1.48.283 2.147l-8.08 9.94c-.58.715-1.677.794-2.363.173L.5 8.305a1.482 1.482 0 0 1-.062-2.162A1.653 1.653 0 0 1 2.7 6.085L6.14 9.2 13.137.591z'/></svg>");
}

/* Disabled feature row — legacy `.feature-description.disabled` swaps the
 * icon for `not-done-icon-savebar.svg` (red ✕) and strikes the text. */
.eq-pw .eq-pw__feature--disabled .eq-pw__feature-text {
    text-decoration: line-through;
    color: rgba(8, 59, 86, 0.5);
}
.eq-pw .eq-pw__feature-icon--disabled {
    /* Inline SVG copy of public/images/in-templates/not-done-icon-savebar.svg
     * (red ✕ at 45% opacity). */
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'><path d='M11 1L1 11M1 1L11 11' stroke='%23FF5252' stroke-opacity='0.45' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>");
}


/* ------------------------------------------------------------------------ *
 * Tooltips — only the days-row tooltip remains. Per-feature tooltips were
 * removed (see `.eq-pw__feature` rules above); the `.eq-pw__days-tooltip`
 * is still rendered by the template and explains how the access-window
 * date picker works.
 * ------------------------------------------------------------------------ */
.eq-pw .eq-pw__days-tooltip {
    /* Legacy values, verbatim from .eq-tooltip-pricing. */
    opacity: 1 !important;
    max-width: 300px;
    white-space: normal;
    text-overflow: initial;
    height: initial;
    line-height: 22px;
    padding: 14px 18px;
    background-color: #083b56 !important;
    font-size: 14px;
    color: white;
    /* Positioning — sits above the trigger, centred. */
    position: absolute;
    left: 50%;
    bottom: 100%;
    transform: translateX(-50%);
    margin-bottom: 8px;
    width: max-content;
    border-radius: 4px;
    text-align: left;
    /* Bumped from z:5 to defensively beat any host-theme stacking context
     * the tooltip might overlap (e.g. Equidam's WP theme promotes <header>
     * elements to z:1000 on desktop). The card header z-index reset above
     * is the primary fix; this is belt-and-braces in case future variants
     * land near other promoted elements. */
    z-index: 1001;
    display: none;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
/* Tooltip arrow pointing down at the trigger. */
.eq-pw .eq-pw__days-tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #083b56;
}
/* Hover/focus reveals — legacy md-tooltip listened to mouseenter on the
 * parent `[md-tooltip]` element. Apply the same pattern with CSS. */
.eq-pw .eq-pw__days-row:hover .eq-pw__days-tooltip,
.eq-pw .eq-pw__days-button:focus-visible ~ .eq-pw__days-tooltip {
    display: block;
}


/* ------------------------------------------------------------------------ *
 * Mobile / tablet media queries
 * Source: pricing-widget-vda.css L311-L344 + pricing-widget-freemium.css L347-L407
 *
 * The legacy CSS had three breakpoints driven by Angular Material's xs/sm
 * grid. We port them as-is and scope to the right variant (the FT file
 * had stricter mobile rules because it has three cards).
 * ------------------------------------------------------------------------ */

/* Mobile — VDA. Source: vda.css L311-L330. */
@media (max-width: 599px) {
    .eq-pw[data-eq-pw-variant="vda"] .eq-pw__card-icon--icon-document2,
    .eq-pw[data-eq-pw-variant="vda"] .eq-pw__card-icon--icon-align-center-horizontal {
        display: none;
    }
    /* Icon is hidden here, so cancel the icon-reservation padding-right
     * (set by the `:has(.eq-pw__card-icon)` rule) — `:has()` matches whether
     * or not the child is `display: none`, so we override explicitly. */
    .eq-pw[data-eq-pw-variant="vda"] .eq-pw__card-header:has(.eq-pw__card-icon) {
        padding-right: 28px;
    }
}

/* Mobile — FT. Source: freemium.css L347-L376. */
@media (max-width: 599px) {
    .eq-pw--freemium .eq-pw__cards {
        /* Wider gap between stacked cards per design feedback — 20px felt
         * cramped once the dark-blue lift was dropped (see rule below). */
        gap: 40px;
        padding: 10px 2vw;
        flex-direction: column;
        align-items: center;
    }
    .eq-pw--freemium .eq-pw__card {
        max-width: 440px;
        width: 100%;
    }
    /* Drop the `.widget-card.big` lift on stacked cards — legacy
     * `.widget-card.big { margin: 0 }` inside the same media query. */
    .eq-pw--freemium .eq-pw__card--dark-blue {
        margin: 0;
    }
    .eq-pw--freemium .eq-pw__card-icon {
        display: none;
    }
    /* Icon hidden — release the reserved right padding. */
    .eq-pw--freemium .eq-pw__card-header:has(.eq-pw__card-icon) {
        padding-right: 28px;
    }
}

/* Mobile — VDA cards stack too (legacy let Material's layout-align-xs
 * handle this; we replicate by collapsing the flex direction). */
@media (max-width: 599px) {
    .eq-pw[data-eq-pw-variant="vda"] .eq-pw__cards {
        flex-direction: column;
        align-items: center;
        /* Match the freemium mobile-stack gap (see freemium rule above). */
        gap: 40px;
        padding: 10px 16px;
    }
    .eq-pw[data-eq-pw-variant="vda"] .eq-pw__card {
        max-width: 440px;
        width: 100%;
    }
}

/* Tablet — VDA. Source: vda.css L331-L344. */
@media (min-width: 600px) and (max-width: 960px) {
    .eq-pw[data-eq-pw-variant="vda"] .eq-pw__cards {
        gap: 20px;
        padding: 10px 14px;
    }
    .eq-pw[data-eq-pw-variant="vda"] .eq-pw__card-icon--icon-document2,
    .eq-pw[data-eq-pw-variant="vda"] .eq-pw__card-icon--icon-align-center-horizontal {
        display: none;
    }
    /* Icon hidden — release the reserved right padding. */
    .eq-pw[data-eq-pw-variant="vda"] .eq-pw__card-header:has(.eq-pw__card-icon) {
        padding-right: 28px;
    }
    .eq-pw[data-eq-pw-variant="vda"] .eq-pw__features {
        padding: 0 26px;
    }
    .eq-pw[data-eq-pw-variant="vda"] .eq-pw__feature {
        font-size: 13px;
    }
}

/* Tablet — FT. Source: freemium.css L378-L401.
 * FT collapses to a column at this width because three cards don't fit. */
@media (min-width: 600px) and (max-width: 960px) {
    .eq-pw--freemium .eq-pw__cards {
        flex-direction: column !important;
        align-items: center;
        gap: 20px;
        padding: 10px 2vw;
    }
    .eq-pw--freemium .eq-pw__card {
        max-width: 440px;
        width: 100%;
    }
    .eq-pw--freemium .eq-pw__card--dark-blue {
        margin: 0;
    }
    .eq-pw--freemium .eq-pw__card-icon {
        display: none;
    }
    /* Icon hidden — release the reserved right padding. */
    .eq-pw--freemium .eq-pw__card-header:has(.eq-pw__card-icon) {
        padding-right: 28px;
    }
    .eq-pw--freemium .eq-pw__features {
        padding: 0 26px;
    }
    .eq-pw--freemium .eq-pw__feature {
        font-size: 13px;
    }
}

/* Desktop-narrow — FT. Source: freemium.css L403-L407.
 * Hide the icons between 960 and 1250px because three side-by-side cards
 * still squeeze the header. */
@media (min-width: 960px) and (max-width: 1250px) {
    .eq-pw--freemium .eq-pw__card-icon {
        display: none;
    }
    /* Icon hidden — release the reserved right padding. */
    .eq-pw--freemium .eq-pw__card-header:has(.eq-pw__card-icon) {
        padding-right: 28px;
    }
}
