/**
 * Free shipping progress bar + "Round out your order" (free-shipping-progress.php)
 *
 * Mobile first. Colours come from the customizer-styles.css token palette with
 * literal fallbacks, so Forest Evening (dark mode) flips them; this file
 * declares no new tokens.
 *
 * Brand notes (docs/BRAND-AND-STYLE.md):
 *  - Dark green is ink only, never a fill. The bar fill is the brand's own
 *    progress gradient (mint to green), which the guide allows.
 *  - Buttons are 6px rectangles, Tier 2 (soft fill, sage border, green text).
 *  - No all caps, no separators.
 *  - The theme puts a 15px shadow on every button and .button on hover and
 *    focus. Add is a link, but it gets the reset anyway in case a parent rule
 *    catches it.
 */

.eg-fsp[hidden] {
    display: none !important;
}

.eg-fsp {
    font-family: brandon-grotesque, 'Brandon Grotesque', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    color: var(--eg-ink-strong, #222222);
    letter-spacing: 0;
    text-transform: none;
}

/* ── Cart page panel ───────────────────────────────────────────────── */

.eg-fsp--cart {
    margin: 14px 0 6px;
    padding: 14px 16px 16px;
    background: var(--eg-card-bg, #ffffff);
    border: 1px solid var(--eg-quiet-border, #e2ece7);
    border-radius: 12px;
}

.eg-fsp--cart.eg-fsp--unlocked {
    background: var(--eg-surface-mint, #eef6f1);
    border-color: var(--eg-brand-sage, #a5ccbc);
    padding-bottom: 14px;
}

/* ── Rows: headline + bar ──────────────────────────────────────────── */

.eg-fsp__row + .eg-fsp__row {
    margin-top: 12px;
}

/* Plain block, not flex: flex would turn "Add", the amount and "more for..."
   into three columns as soon as the line wraps. */
.eg-fsp .eg-fsp__headline {
    display: block;
    margin: 0 0 8px;
    padding: 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--eg-ink-strong, #222222);
}

.eg-fsp .eg-fsp__amount {
    color: var(--eg-accent, #2c5e54);
    font-weight: 700;
}

.eg-fsp__check {
    display: inline-block;
    vertical-align: -3px;
    width: 18px;
    height: 18px;
    margin-right: 6px;
    border-radius: 50%;
    background: var(--eg-accent-light, #bfe2dc);
    position: relative;
}

.eg-fsp__check::after {
    content: "";
    position: absolute;
    left: 6px;
    top: 3px;
    width: 5px;
    height: 9px;
    border: solid var(--eg-accent, #2c5e54);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.eg-fsp__track {
    position: relative;
    height: 8px;
    border-radius: 999px;
    background: var(--eg-progress-track, #eceae6);
    overflow: hidden;
}

.eg-fsp__fill {
    display: block;
    height: 100%;
    min-width: 8px;
    border-radius: 999px;
    background: var(--eg-progress-fill, linear-gradient(90deg, #bfe2dc, #2c5e54));
    transition: width 0.4s ease;
}

.eg-fsp .eg-fsp__fee {
    margin: 8px 0 0;
    padding: 0;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.4;
    color: var(--eg-neutral-600, #4b5563);
}

@media (prefers-reduced-motion: reduce) {
    .eg-fsp__fill {
        transition: none;
    }
}

/* ── Ideas: "Anything else you need?" ─────────────────────────────── */

.eg-fsp__ideas {
    margin-top: 16px;
}

.eg-fsp--ideas-only .eg-fsp__ideas {
    margin-top: 0;
}

.eg-fsp__ideas-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 0 0 8px;
}

.eg-fsp .eg-fsp__ideas-title {
    margin: 0;
    padding: 0;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--eg-accent, #2c5e54);
    text-transform: none;
    letter-spacing: 0;
}

/* Idea buttons, arrows and the count need the script; without it the row is
   a plain sideways-scrolling list and every card shows. */
.eg-fsp__tabs,
.eg-fsp__pager {
    display: none;
}

.js .eg-fsp__tabs {
    display: block;
    position: relative;
    margin: 0 0 6px;
}

.js .eg-fsp__pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 6px;
}

.js .eg-fsp__pager[hidden] {
    display: none;
}

/* The idea buttons: a sideways strip of plain words, like the shop's
   subcategory filter. Only the chosen one gets a soft fill. */
.eg-fsp__chips {
    display: flex;
    gap: 2px;
    overflow-x: auto;
    scrollbar-width: none;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.eg-fsp__chips::-webkit-scrollbar {
    display: none;
}

.eg-fsp .eg-fsp__chip {
    flex: 0 0 auto;
    min-height: 34px;
    margin: 0;
    padding: 6px 10px;
    background: transparent;
    border: 0;
    border-radius: 6px;
    color: var(--eg-ink-body-soft, #5a6b65);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0;
    text-transform: none;
    white-space: nowrap;
    box-shadow: none;
    cursor: pointer;
}

.eg-fsp .eg-fsp__chip:hover {
    background: transparent;
    color: var(--eg-accent, #2c5e54);
    box-shadow: none !important;
}

.eg-fsp .eg-fsp__chip.is-active {
    background: var(--eg-accent-light, #bfe2dc);
    color: var(--eg-accent, #2c5e54);
}

.eg-fsp .eg-fsp__chip:focus,
.eg-fsp .eg-fsp__scroll:focus,
.eg-fsp .eg-fsp__arrow:focus {
    box-shadow: none !important;
    outline: none;
}

.eg-fsp .eg-fsp__chip:focus-visible,
.eg-fsp .eg-fsp__scroll:focus-visible,
.eg-fsp .eg-fsp__arrow:focus-visible {
    outline: 2px solid var(--eg-accent, #2c5e54);
    outline-offset: 2px;
}

/* Round arrows, the same as the subcategory strip's (ssf-scroll-btn). */
.eg-fsp .eg-fsp__scroll,
.eg-fsp .eg-fsp__arrow {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    min-height: 0;
    margin: 0;
    padding: 0;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid #d1e0db;
    border-radius: 50%;
    color: var(--eg-ink-strong, #222222);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    cursor: pointer;
}

.eg-fsp .eg-fsp__scroll svg,
.eg-fsp .eg-fsp__arrow svg {
    width: 16px;
    height: 16px;
}

.eg-fsp .eg-fsp__scroll:hover,
.eg-fsp .eg-fsp__arrow:hover {
    border-color: var(--eg-brand-sage, #a5ccbc);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08) !important;
}

.eg-fsp .eg-fsp__arrow {
    width: 32px;
    height: 32px;
}

/* The theme pads and greys every disabled button; keep these round. */
.eg-fsp .eg-fsp__arrow:disabled,
.eg-fsp .eg-fsp__arrow[disabled] {
    box-sizing: border-box;
    width: 32px;
    padding: 0 !important;
    background: rgba(255, 255, 255, 0.95) !important;
    border: 2px solid #d1e0db !important;
    opacity: 0.35;
    cursor: default;
}

.eg-fsp .eg-fsp__scroll {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
}

.eg-fsp .eg-fsp__scroll[hidden] {
    display: none;
}

.eg-fsp__scroll--left {
    left: -4px;
}

.eg-fsp__scroll--right {
    right: -4px;
}

.eg-fsp__count {
    min-width: 54px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--eg-ink-body-soft, #5a6b65);
}

/* The swipe row. One card and a peek of the next on a phone, two side by
   side on wider screens. Snaps so a flick always lands on a whole card. */
.eg-fsp .eg-fsp__ideas-list {
    display: flex;
    gap: 16px;
    margin: 0;
    padding: 0 0 4px;
    list-style: none;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.eg-fsp .eg-fsp__ideas-list::-webkit-scrollbar {
    display: none;
}

.eg-fsp .eg-fsp__ideas-list[hidden] {
    display: none;
}

.eg-fsp .eg-fsp__ideas-list:focus-visible {
    outline: 2px solid var(--eg-brand-sage, #a5ccbc);
    outline-offset: 2px;
}

/* One item at a time on a phone, sitting flat in the panel (no box inside
   the box). Two side by side on wider screens. */
.eg-fsp .eg-fsp-card {
    flex: 0 0 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    padding: 4px 0;
    background: transparent;
    border: 0;
    list-style: none;
    scroll-snap-align: start;
}

.eg-fsp .eg-fsp-card[hidden] {
    display: none;
}

.eg-fsp .eg-fsp-card::before {
    content: none; /* theme list bullets */
}

.eg-fsp-card__media {
    flex: 0 0 56px;
    width: 56px;
    height: 56px;
    border-radius: 6px;
    overflow: hidden;
    background: var(--eg-surface-mint, #eef6f1);
}

.eg-fsp .eg-fsp-card__media img {
    display: block;
    width: 56px;
    height: 56px;
    max-width: none;
    object-fit: cover;
    margin: 0;
}

.eg-fsp-card__body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.eg-fsp-card__source {
    align-self: flex-start;
    padding: 1px 7px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.5;
    white-space: nowrap;
    background: var(--eg-brand-teal-soft, #d3eeea);
    color: var(--eg-brand-teal-strong, #1f7a73);
}

.eg-fsp-card__source--shopping-list {
    background: var(--eg-brand-blue-soft, #d7edf7);
    color: var(--eg-brand-blue-strong, #1f6d86);
}

.eg-fsp-card__source--wishlist,
.eg-fsp-card__source--top-up {
    background: var(--eg-brand-green-soft, #cce9dc);
    color: var(--eg-accent, #2c5e54);
}

.eg-fsp-card__source--bought,
.eg-fsp-card__source--viewed {
    background: var(--eg-quiet-border, #e2ece7);
    color: var(--eg-ink-body-soft, #5a6b65);
}

.eg-fsp .eg-fsp-card__name {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--eg-ink-strong, #222222);
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.eg-fsp .eg-fsp-card__name:hover,
.eg-fsp .eg-fsp-card__name:focus-visible {
    color: var(--eg-accent, #2c5e54);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.eg-fsp-card__price {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--eg-price-color, #2c5e54);
}

.eg-fsp-card__price del {
    font-weight: 400;
    color: var(--eg-ink-body-soft, #5a6b65);
    margin-right: 0.3em;
}

.eg-fsp-card__price ins {
    text-decoration: none;
}

/* Tier 2 button: soft fill, sage border, green text. 44px tall for thumbs. */
.eg-fsp .eg-fsp-card__add {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 64px;
    min-height: 44px;
    padding: 8px 14px;
    background: var(--eg-btn-secondary-bg, #f5f9f6);
    border: 1.5px solid var(--eg-btn-secondary-border, #a5ccbc);
    border-radius: 6px;
    color: var(--eg-accent, #2c5e54);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.1;
    text-align: center;
    text-decoration: none;
    text-transform: none;
    letter-spacing: 0;
    white-space: nowrap;
    box-shadow: none;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.eg-fsp .eg-fsp-card__add:hover {
    background: var(--eg-accent-light, #bfe2dc);
    border-color: var(--eg-brand-sage, #a5ccbc);
    color: var(--eg-accent, #2c5e54);
    text-decoration: none;
    box-shadow: none !important;
}

.eg-fsp .eg-fsp-card__add:focus {
    box-shadow: none !important;
    outline: none;
}

.eg-fsp .eg-fsp-card__add:focus-visible {
    outline: 2px solid var(--eg-accent, #2c5e54);
    outline-offset: 2px;
}

.eg-fsp .eg-fsp-card__add.is-loading {
    opacity: 0.7;
    cursor: progress;
}

.eg-fsp .eg-fsp-card__add.is-added {
    background: var(--eg-surface-mint, #eef6f1);
    border-color: var(--eg-accent-light, #bfe2dc);
    cursor: default;
}

/* Keep shopping: the aisles already in the basket. */
.eg-fsp__aisles {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
}

.eg-fsp--cart .eg-fsp__ideas > .eg-fsp__aisles:not(.eg-fsp__aisles--tab) {
    margin-top: 0;
}

.js .eg-fsp__aisles--tab {
    display: none;
    margin-top: 0;
}

.js .eg-fsp__aisles--tab.is-active {
    display: flex;
}

/* Behind its own button, the label would only repeat the button. */
.js .eg-fsp__aisles--tab .eg-fsp__aisles-label {
    display: none;
}

.eg-fsp__aisles-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--eg-ink-body-soft, #5a6b65);
    margin-right: 2px;
}

/* The shared category pill points backwards (leading arrow); these point
   onward into an aisle, so swap it for a trailing arrow, as the product
   page's Keep browsing strip does. */
.eg-fsp .eg-cat-pill--fwd::before {
    content: none;
}

.eg-fsp .eg-cat-pill--fwd::after {
    content: "\2192";
    font-size: 0.9em;
    color: var(--eg-accent, #2c5e54);
    margin-left: 0.05rem;
}

.eg-fsp .eg-fsp__aisle {
    min-height: 36px;
}

@media (min-width: 600px) {
    .eg-fsp .eg-fsp-card {
        flex-basis: calc(50% - 8px);
    }
}

/* ── Header mini cart ──────────────────────────────────────────────── */

.mini-cart-panel .eg-fsp--mini {
    margin: 0 0 8px;
    padding: 10px 12px;
    background: var(--eg-quiet-bg, #fafbfa);
    border: 1px solid var(--eg-quiet-border, #e2ece7);
    border-radius: 6px;
}

.mini-cart-panel .eg-fsp--mini.eg-fsp--unlocked {
    background: var(--eg-surface-mint, #eef6f1);
}

.mini-cart-panel .eg-fsp--mini .eg-fsp__headline {
    font-size: 14px;
    margin-bottom: 6px;
}

.mini-cart-panel .eg-fsp--mini .eg-fsp__track {
    height: 6px;
}

.mini-cart-panel .eg-fsp--mini .eg-fsp__fee {
    font-size: 12px;
    margin-top: 6px;
}

.mini-cart-panel .eg-fsp--mini .eg-fsp__row + .eg-fsp__row {
    margin-top: 8px;
}
