/**
 * BulCommerce — shared pickup-point list.
 *
 * Econt and Speedy grew their own office pickers independently and ended up
 * drawing the same thing under different names:
 *
 *   Econt   ul.fc-econt-select__results > li.fc-econt-select__row--rich
 *             > __row-ic · __row-body · __row-name · __row-addr
 *   Speedy  div.fc-speedy__list        > button.fc-speedy__opt
 *             > __opt-ic · __opt-body · __opt-name · __opt-addr
 *
 * Same structure, two vocabularies — so every visual change had to be made
 * twice and the two lists drifted apart. Both renderers now ALSO emit the
 * neutral classes below, and this file is the single place their appearance is
 * defined. A courier that adds a picker later opts in by emitting the same
 * classes; it does not get its own copy of these rules.
 *
 * The courier-specific classes are deliberately still emitted — the click and
 * keyboard handlers in econt-frontend.js / speedy-frontend.js select on them,
 * as do their non-list styles. This file styles only the shared skin.
 *
 * Loaded as a dependency of both econt-frontend.css and speedy-frontend.css, so
 * it is present whenever either picker is on the page and never twice.
 *
 * DOM contract:
 *   .fc-pickup__list                 — scroll container
 *     .fc-pickup__row                — one pickup point (li or button)
 *       .fc-pickup__ic               — leading location pin
 *       .fc-pickup__body             — text column
 *         .fc-pickup__name           — office name
 *         .fc-pickup__addr           — address line
 */

.fc-pickup__list {
    background: #fff;
    border: 1px solid var(--fc-gray-200, #e2e8f0);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 8px;
    max-height: 240px;
    overflow-y: auto;
}

/* Scoped under the list and carrying the theme-defeating !important flags that
   used to live in speedy-frontend.css. One courier renders the row as a <button>,
   which themes style hard (min-height, uppercase, borders, full-width blocks), so
   the reset has to win — and it has to live HERE, or the courier stylesheet that
   still carried it would out-rank the shared skin and the two lists would look
   different again. That is exactly what happened: Speedy kept border:0/radius:10px
   while Econt showed a 1px/9px card. */
.fc-pickup__list .fc-pickup__row {
    display: flex !important;            /* wc/theme-override */
    align-items: flex-start;
    justify-content: flex-start !important; /* wc/theme-override */
    gap: 10px;
    width: 100%;
    min-height: 0;
    padding: 10px 12px !important;       /* wc/theme-override */
    margin: 0 !important;                /* wc/theme-override */
    border: 0 !important;                /* wc/theme-override */
    border-radius: 10px !important;      /* wc/theme-override */
    background: transparent;
    text-align: left;
    line-height: 1.3;
    letter-spacing: normal;
    text-transform: none;
    cursor: pointer;
    transition: background .12s ease, border-color .12s ease;
    /* Rows are <li> on one courier and <button> on the other — neutralise the list
       marker and the button chrome so both read identically. */
    list-style: none !important;         /* wc/theme-override */
    font: inherit;
    color: inherit;
    -webkit-appearance: none;
    appearance: none;
}

.fc-pickup__row::marker {
    content: "";
}

.fc-pickup__list .fc-pickup__row:hover,
.fc-pickup__list .fc-pickup__row.is-active,
.fc-pickup__list .fc-pickup__row.is-selected {
    background: #eff6ff !important;      /* wc/theme-override */
}

/* Hairline between consecutive rows — the compact dropdown look. Replaced by a
   full card border under the Locator template below. */
.fc-pickup__list .fc-pickup__row + .fc-pickup__row {
    border-top: 1px solid var(--fc-gray-100, #f1f5f9) !important; /* wc/theme-override */
}

.fc-pickup__ic {
    flex-shrink: 0;
    margin-top: 1px;
    color: var(--fc-blue, #3b5ef5);
}

.fc-pickup__body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.fc-pickup__name {
    font-size: 14px;
    font-weight: 700;
    color: var(--fc-gray-900, #0f172a);
    line-height: 1.25;
}

.fc-pickup__addr {
    font-size: 12.5px;
    font-weight: 500;
    color: var(--fc-gray-500, #64748b);
    line-height: 1.35;
}


/* ===========================================================================
   LOCATOR TEMPLATE — the list is permanent furniture, not a dropdown.
   Both couriers' renderers keep it populated under this body class (see the
   showAll()/renderOfficeList calls guarded on it), so the only thing left here
   is to lay it out in the flow instead of as an overlay.
   =========================================================================== */

body.flowcheckout--shipping-locator .fc-pickup__list {
    position: static;
    margin-top: 8px !important; /* wc/theme-override — Econt's base rule uses margin:0 */
    box-shadow: none;
    /* Roughly five cards before it scrolls. A city like Sofia returns 300+
       offices; rendering them all inline would stretch the checkout for pages. */
    max-height: 340px;
}

body.flowcheckout--shipping-locator .fc-pickup__list .fc-pickup__row {
    /* Separate cards rather than hairline-divided rows. */
    border: 1px solid var(--fc-gray-200, #e2e8f0) !important; /* wc/theme-override */
    margin-bottom: 8px !important;                            /* wc/theme-override */
    background: #fff;
}

body.flowcheckout--shipping-locator .fc-pickup__list .fc-pickup__row:hover,
body.flowcheckout--shipping-locator .fc-pickup__list .fc-pickup__row.is-active,
body.flowcheckout--shipping-locator .fc-pickup__list .fc-pickup__row.is-selected {
    border-color: var(--fc-blue, #3b5ef5) !important;         /* wc/theme-override */
}

body.flowcheckout--shipping-locator .fc-pickup__list .fc-pickup__row:last-child {
    margin-bottom: 0 !important;                              /* wc/theme-override */
}

/* ─── List note ─────────────────────────────────────────────────────────────
   A single non-selectable line under the rows: "Showing 60 of 312 — keep
   typing", or, when the list is empty, why it is empty. Emitted by BOTH
   pickers (fc-econt-select__note / fc-speedy__note), so it lives here with the
   rest of the shared skin rather than being described twice and drifting.

   Deliberately quiet: it is an annotation on the list, and must not read as
   one more thing to click. Hence no card treatment, no border, and a size
   below the row text.
   ------------------------------------------------------------------------ */

.fc-pickup__note {
    padding: 8px 4px 2px;
    font-size: 12px;
    line-height: 1.35;
    color: var(--fc-gray-500, #64748b);
    text-align: center;
    /* A <li> in the Econt list — kill the marker the theme may put back. */
    list-style: none;
    cursor: default;
}

/* The last row's bottom margin plus this padding reads as a gap, not a pair. */
body.flowcheckout--shipping-locator .fc-pickup__list .fc-pickup__note {
    padding-top: 4px;
}
