/* ===================================================================
   The search field and its suggest panel.

   PORTED VERBATIM from the mockups' own two sources, joined here
   because the build ships one stylesheet per block rather than one per
   page: css/parts/ea-search-field.css owns the field, and the suggest
   panel's 24 rules live in css/pages/front-page.css because the mockup
   had nowhere else to put them.

   .ea-search__box IS A SCRIPT HOOK, not only a wrapper. view.js calls
   form.querySelector('.ea-search__box') and abandons the enhancement if
   it is absent, so renaming this class silently disables the panel and
   leaves a field that still looks correct.
   ==================================================================*/

/* ===================================================================
   The search field (§5.8)

   `.ea-search__box` is a script hook: js/pages/search.js calls
   `input.closest(".ea-search__box")` with no guard, so taking the class off
   the field's wrapper throws and kills the autocomplete.
   ===================================================================*/
/* ---- 5.8 The search field ------------------------------------------
   Do not drop the border on white: the fill is not its own boundary there,
   and --ea-border-control carries the edge at 3.14:1 against 01 §3.4's 3:1
   floor. On a band the white fill is the boundary and the ring goes white. */
.ea-search__box {
    display: flex;
    align-items: center;
    height: 52px;
    padding: 0 var(--ea-s2) 0 var(--ea-s4);
    background: var(--ea-surface);
    border: 1px solid var(--ea-border-control);
    border-radius: var(--ea-radius-card);
    transition:
        border-color var(--transition-fast),
        box-shadow var(--transition-fast);
}
.ea-search__box:focus-within {
    border-color: var(--ea-blue-700);
    box-shadow: 0 0 0 2px var(--ea-blue-100);
}
.ea-band .ea-search__box {
    height: 56px;
    border-color: transparent;
    transition: box-shadow var(--transition-fast);
}
.ea-band .ea-search__box:focus-within {
    border-color: transparent;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.85);
}
/* 44 by 44px at every width: 01 §11 is a capability rule, not a width rule.
   Do not fold `.ea-sr-search__submit` (pages/search-results.css) onto this
   class: it would take the white `.ea-band :focus-visible` ring, not blue. */
.ea-search__submit {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex: none;
    padding: 0;
    border: 0;
    border-radius: var(--ea-radius-card);
    background: var(--ea-blue-700);
    color: #ffffff;
    cursor: pointer;
    transition: background var(--transition-fast);
}
.ea-search__submit:hover {
    background: var(--ea-blue-500);
}
.ea-search__submit:focus-visible {
    outline: 2px solid var(--ea-blue-700);
    outline-offset: 2px;
}
.ea-search__icon {
    color: var(--ea-ink-500);
    margin-right: var(--ea-s3);
}
/* `.ea-search__box` PREFIXED, and it is not cosmetic. Blocksy styles
   `select, textarea, input:is([type="text"], ...)` at (0,1,1), which beats a
   bare `.ea-search__input` at (0,1,0), so the field computed height 40px with a
   1px grey border and a 3px radius against the mockup's 54px and no border at
   all. It painted as a faint grey box inside the white field on every page that
   draws the search, measured out of CDP matched styles on the live site. */
.ea-search__box .ea-search__input {
    border-radius: 0;
    flex: 1 1 auto;
    min-width: 0;
    height: 100%;
    padding: 0;
    border: 0;
    background: none;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--ea-ink-900);
}
.ea-search__input::placeholder {
    color: var(--ea-ink-300);
    opacity: 1;
}
/* The input's own outline is suppressed because the ring is drawn on
   `.ea-search__box:focus-within`; delete that rule and the field has no
   visible focus indicator at all. */
.ea-search__input:focus {
    outline: none;
}

/* 44px per 01 §11, which the 52px box in the content area and the 56px box
   on a band both clear. */
.ea-search__clear {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex: none;
    margin-right: -6px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: none;
    color: var(--ea-ink-500);
    cursor: pointer;
}
.ea-search__clear:hover {
    color: var(--ea-blue-700);
    background: var(--ea-blue-100);
}

/* ---- The suggest panel, from css/pages/front-page.css -------------*/
.ea-suggest {
    position: absolute;
    z-index: 40;
    left: 0;
    right: 0;
    top: calc(100% + var(--ea-s2));
    max-height: 560px; /* refined at open() to the room under the field */
    /* `hidden auto` and not `auto`: the horizontal clip is what cuts an active
       row's full-bleed band to the panel's rounded corners. */
    overflow: hidden auto;
    padding: 0;
    text-align: left;
    background: var(--ea-surface);
    border: 1px solid var(--ea-line);
    border-radius: var(--ea-radius-card);
    box-shadow: var(--box-shadow);
    animation: ea-suggest-in var(--transition-fast) ease-out;
}
.ea-suggest .ea-suggest__hint {
    margin: 0;
    padding: var(--ea-s3) var(--ea-s4) var(--ea-s1);
    font-size: 0.82rem;
    line-height: 22px;
    color: var(--ea-ink-500);
}
/* ROUND 19, CLIENT ITEM FP1. The hint is the listbox's ACCESSIBLE LABEL
   (`blocks/search/render.php` points `aria-labelledby` at it), so on a query it
   is taken out of the VISUAL flow rather than emptied or removed. `view.js`
   puts `.ea-suggest--query` on the panel while a query is showing.

   (0,2,0), which is what the base rule above carries, so the padding is actually
   overridden rather than losing to it and leaving a padded 1px box. The
   `clip-path` is what modern engines read and the deprecated `clip` is what
   keeps older ones from painting it; both are in the portal's own `.ea-sr-only`
   and the treatment is copied from there rather than borrowed by class name,
   because this rule has to beat a (0,2,0) selector and `.ea-sr-only` is (0,1,0). */
.ea-suggest--query .ea-suggest__hint {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}
/* The room the visible hint used to hold open. Without it the first row sits
   flush against the panel's top border, which reads as a clipped list. */
.ea-suggest--query .ea-suggest__list {
    padding-top: var(--ea-s2);
}
.ea-suggest__row {
    display: flex;
    align-items: center;
    gap: var(--ea-s3);
    min-height: 52px;
    padding: var(--ea-s1) var(--ea-s4);
    color: var(--ea-ink-900);
    text-decoration: none;
    cursor: pointer;
}
.ea-suggest__row:hover {
    background: var(--ea-blue-050);
    color: var(--ea-ink-900);
}
.ea-suggest__row.is-active {
    background: var(--ea-blue-100);
    color: var(--ea-ink-900);
    box-shadow:
        inset 0 1px 0 0 var(--ea-blue-500),
        inset 0 -1px 0 0 var(--ea-blue-500);
}
.ea-suggest__mark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex: none;
    font-family: var(--font-heading);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}
.ea-suggest__mark--category {
    border-radius: var(--ea-radius-card);
    background: var(--ea-blue-100);
    color: var(--ea-blue-700);
}
/* ROUND 19, CLIENT ITEM FP3. A country's mark is its flag, in the same 40px slot
   every other mark uses.

   NO MASK OF ITS OWN, AND THAT IS READ OFF THE ASSET RATHER THAN ASSUMED.
   `assets/flags/<iso>.svg` is a 32x32 square whose contents are already clipped
   to `<circle cx="16" cy="16" r="16">`, so the file arrives round: adding a
   `border-radius: 50%` here would mask nothing and a card radius would cut the
   corners off a transparent square. The slot therefore only has to hold the
   image at the same 40px as the logo circles beside it, which is what makes the
   marks line up.

   `.ea-flag` IS DELIBERATELY NOT USED. That class carries `margin-right: 8px`,
   written for the header's language switcher, and it is the documented root
   cause of two client reports about doubled gaps on other pages (REVIEWS 1.4
   item 4). Two pages already carry (0,3,0) overrides to undo it; a third is not
   the answer. */
.ea-suggest__mark--country img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.ea-suggest__mark--european,
.ea-suggest__mark--foreign {
    border-radius: 50%;
    color: #ffffff;
}
.ea-suggest__mark--foreign {
    background: var(--ea-surface);
    color: var(--ea-ink-500);
    border: 1px solid var(--ea-line);
    box-shadow: 0 0 0 3px var(--ea-surface-muted);
}
/* THE MONOGRAM WITH NO BRAND COLOUR, WHICH ON THIS INSTALL IS EVERY MONOGRAM.
   `.ea-suggest__mark--european` above sets `color: #ffffff` on the strength of
   the inline background the mockup's demo index always carries. No such field
   exists here (search/index.php returns `colour: null` on every row), so the
   ground stayed white and the initials were white on white: measured on the
   live panel for "mail", the logo-less rapidmail row drew an empty circle.

   (0,2,0) on purpose, against the (0,1,0) of both `.ea-suggest__mark--european`
   above and `.ea-logo--mono` in ea-content.css, so the answer does not depend
   on which stylesheet the page loads second. The `--foreign` monogram already
   reads correctly through its own ring rule and is left alone, because that
   ring is the not-European signal and a second treatment would blur it. */
.ea-suggest__mark--european.ea-logo--mono {
    background: var(--ea-surface-muted);
    color: var(--ea-ink-500);
}
.ea-suggest__mark--logo.ea-suggest__mark--foreign {
    border-color: var(--ea-line);
    box-shadow:
        0 0 0 3px var(--ea-surface-muted),
        0 0 0 4px var(--ea-line);
}
.ea-suggest__mark--logo img {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    object-fit: contain;
}
.ea-suggest__body {
    flex: 1 1 auto;
    min-width: 0;
}
.ea-suggest__name {
    display: block;
    font-size: 1rem;
    line-height: 24px;
    color: var(--ea-ink-900);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ea-suggest__hl {
    font-weight: 700;
}
.ea-suggest__sub {
    display: block;
    font-size: 0.82rem;
    line-height: 20px;
    color: var(--ea-ink-500);
}
.ea-suggest__type {
    flex: none;
    max-width: 42%;
    font-size: 0.82rem;
    line-height: 20px;
    text-align: right;
    color: var(--ea-ink-500);
    font-variant-numeric: tabular-nums;
}
.ea-suggest__all {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--ea-s3);
    min-height: 48px;
    margin-top: var(--ea-s2);
    padding: var(--ea-s2) var(--ea-s4);
    border-top: 1px solid var(--ea-line);
    font-size: 0.82rem;
    line-height: 22px;
    font-weight: 700;
    color: var(--ea-blue-700);
    text-decoration: none;
    cursor: pointer;
}
.ea-suggest__all .ea-ico {
    width: 18px;
    height: 18px;
}
.ea-suggest__all:hover {
    background: var(--ea-blue-050);
    color: var(--ea-blue-700);
}
.ea-suggest__all {
    border-bottom-left-radius: 9px;
    border-bottom-right-radius: 9px;
}
.ea-suggest__all.is-active {
    background: var(--ea-blue-100);
    color: var(--ea-blue-700);
    border-top-color: var(--ea-blue-500);
}
.ea-suggest .ea-suggest__empty {
    margin: 0;
    padding: var(--ea-s3) var(--ea-s4) var(--ea-s5);
    color: var(--ea-ink-500);
}
.ea-suggest__empty strong {
    color: var(--ea-ink-900);
}
/* THESE FOUR RULES LOST THEIR MEDIA QUERIES ON THE WAY OUT OF THE MOCKUP, and
   the effect was total: `.ea-suggest__type` was `display: none` at EVERY width,
   so the right-hand meta column ("European service · Germany", "Alternatives ·
   9 European options") never painted on any viewport, and `.ea-suggest__sub--type`
   was `display: none` too, so the narrow-screen substitute never painted either.
   The type of a result was therefore stated nowhere at all, which is the one
   thing 02 §6 says must always be stated in words.

   Measured 2026-09-07 at 1440 with the panel open on "mail": six
   `.ea-suggest__type` elements in the DOM, ZERO of them reported by
   `checkVisibility()`, against six painted on the mockup.

   The pairing is the mockup's own (css/pages/front-page.css, the two blocks at
   its foot) and it is exclusive by construction: exactly one of the two ever
   renders, so the type is always in words and never twice. */
@media (max-width: 767px) {
    .ea-suggest__type {
        display: none;
    }
    .ea-suggest__sub {
        white-space: normal;
    }
    .ea-suggest__sub--type::before {
        content: " · ";
    }
    /* ROUND 19, CLIENT ITEM FP4, on the narrow layout. A row whose sub-line is
       empty drew a LEADING middot with nothing in front of it, which is the same
       "a piece of information is missing" the client reported on the wide
       layout's type column. `view.js` adds this class when `subLine` is '', which
       CSS cannot test for itself because the sub-line is a preceding TEXT NODE.
       Measured before the fix on the live panel: 8 legacy top-level categories
       carry no cluster and several services carry no category. */
    .ea-suggest__sub--type-only::before {
        content: none;
    }
}
@media (min-width: 768px) {
    .ea-suggest__sub--type {
        display: none;
    }
}
