/* =========================================================================
 * Tokens — shared by the block and its trigger button
 * ========================================================================= */
.hi-oosn,
.hi-oosn-trigger,
.hi-oosn-account,
.hi-oosn-modal {
    /* Color */
    --hi-oosn-color-accent: #111827;
    --hi-oosn-color-accent-hover: #374151;
    --hi-oosn-color-accent-contrast: #ffffff;
    --hi-oosn-color-accent-soft: rgba(17, 24, 39, 0.06);

    --hi-oosn-color-muted: #6b7280;
    --hi-oosn-color-border: #e5e7eb;
    --hi-oosn-color-border-strong: #d1d5db;

    --hi-oosn-color-bg: #ffffff;
    --hi-oosn-color-bg-soft: #f9fafb;
    --hi-oosn-color-bg-input: #ffffff;

    --hi-oosn-color-success: #047857;
    --hi-oosn-color-success-bg: #ecfdf5;
    --hi-oosn-color-success-border: #a7f3d0;

    --hi-oosn-color-error: #b91c1c;
    --hi-oosn-color-error-bg: #fef2f2;
    --hi-oosn-color-error-border: #fecaca;

    --hi-oosn-color-focus-ring: rgba(17, 24, 39, 0.18);

    /* Shape */
    --hi-oosn-radius: 10px;
    --hi-oosn-radius-sm: 8px;
    --hi-oosn-border-width: 1px;

    /* Space */
    --hi-oosn-spacing-xs: 0.375rem;
    --hi-oosn-spacing-sm: 0.5rem;
    --hi-oosn-spacing: 0.75rem;
    --hi-oosn-spacing-md: 1rem;
    --hi-oosn-spacing-lg: 1.25rem;

    /* Type */
    --hi-oosn-font-size: 0.9375rem;
    --hi-oosn-font-size-sm: 0.8125rem;
    --hi-oosn-font-size-title: 1.0625rem;
    --hi-oosn-font-weight-title: 600;

    /* Controls */
    --hi-oosn-control-height: 42px;
    --hi-oosn-control-height-sm: 36px;

    /* Motion */
    --hi-oosn-transition: 150ms ease;
}

/* =========================================================================
 * Color schemes — re-bind tokens per data-hi-oosn-scheme attribute.
 * Default Light has no block (it equals the baseline above).
 * Add/edit a scheme: update the block here AND the catalog entry in
 * classes/colorSchemes.php (admin-picker metadata only).
 * ========================================================================= */
.hi-oosn[data-hi-oosn-scheme="charcoal_dark"],
.hi-oosn-trigger[data-hi-oosn-scheme="charcoal_dark"],
.hi-oosn-modal[data-hi-oosn-scheme="charcoal_dark"],
.hi-oosn-account[data-hi-oosn-scheme="charcoal_dark"] {
    --hi-oosn-color-accent: #f8fafc;
    --hi-oosn-color-accent-hover: #e2e8f0;
    --hi-oosn-color-accent-contrast: #0f172a;
    --hi-oosn-color-accent-soft: rgba(248, 250, 252, 0.08);
    --hi-oosn-color-muted: #94a3b8;
    --hi-oosn-color-border: #334155;
    --hi-oosn-color-border-strong: #475569;
    --hi-oosn-color-bg: #0f172a;
    --hi-oosn-color-bg-soft: #1e293b;
    --hi-oosn-color-bg-input: #1e293b;
    --hi-oosn-color-text: #f1f5f9;
    --hi-oosn-color-focus-ring: rgba(248, 250, 252, 0.22);
}

.hi-oosn[data-hi-oosn-scheme="warm_sand"],
.hi-oosn-trigger[data-hi-oosn-scheme="warm_sand"],
.hi-oosn-modal[data-hi-oosn-scheme="warm_sand"],
.hi-oosn-account[data-hi-oosn-scheme="warm_sand"] {
    --hi-oosn-color-accent: #b45309;
    --hi-oosn-color-accent-hover: #92400e;
    --hi-oosn-color-accent-contrast: #fffbeb;
    --hi-oosn-color-accent-soft: rgba(180, 83, 9, 0.08);
    --hi-oosn-color-muted: #92866a;
    --hi-oosn-color-border: #fde68a;
    --hi-oosn-color-border-strong: #fbbf24;
    --hi-oosn-color-bg: #fffbeb;
    --hi-oosn-color-bg-soft: #fef3c7;
    --hi-oosn-color-bg-input: #fffbeb;
    --hi-oosn-color-text: #422006;
    --hi-oosn-color-focus-ring: rgba(180, 83, 9, 0.22);
}

.hi-oosn[data-hi-oosn-scheme="cool_mist"],
.hi-oosn-trigger[data-hi-oosn-scheme="cool_mist"],
.hi-oosn-modal[data-hi-oosn-scheme="cool_mist"],
.hi-oosn-account[data-hi-oosn-scheme="cool_mist"] {
    --hi-oosn-color-accent: #0f766e;
    --hi-oosn-color-accent-hover: #115e59;
    --hi-oosn-color-accent-contrast: #f8fafc;
    --hi-oosn-color-accent-soft: rgba(15, 118, 110, 0.08);
    --hi-oosn-color-muted: #64748b;
    --hi-oosn-color-border: #e2e8f0;
    --hi-oosn-color-border-strong: #cbd5e1;
    --hi-oosn-color-bg: #f8fafc;
    --hi-oosn-color-bg-soft: #f1f5f9;
    --hi-oosn-color-bg-input: #ffffff;
    --hi-oosn-color-text: #0f172a;
    --hi-oosn-color-focus-ring: rgba(15, 118, 110, 0.22);
}

.hi-oosn[data-hi-oosn-scheme="forest"],
.hi-oosn-trigger[data-hi-oosn-scheme="forest"],
.hi-oosn-modal[data-hi-oosn-scheme="forest"],
.hi-oosn-account[data-hi-oosn-scheme="forest"] {
    --hi-oosn-color-accent: #166534;
    --hi-oosn-color-accent-hover: #14532d;
    --hi-oosn-color-accent-contrast: #ffffff;
    --hi-oosn-color-accent-soft: rgba(22, 101, 52, 0.08);
    --hi-oosn-color-muted: #6b7280;
    --hi-oosn-color-border: #d1fae5;
    --hi-oosn-color-border-strong: #a7f3d0;
    --hi-oosn-color-bg: #ffffff;
    --hi-oosn-color-bg-soft: #f0fdf4;
    --hi-oosn-color-bg-input: #ffffff;
    --hi-oosn-color-text: #0f172a;
    --hi-oosn-color-focus-ring: rgba(22, 101, 52, 0.22);
}

.hi-oosn[data-hi-oosn-scheme="sunset"],
.hi-oosn-trigger[data-hi-oosn-scheme="sunset"],
.hi-oosn-modal[data-hi-oosn-scheme="sunset"],
.hi-oosn-account[data-hi-oosn-scheme="sunset"] {
    --hi-oosn-color-accent: #c2410c;
    --hi-oosn-color-accent-hover: #9a3412;
    --hi-oosn-color-accent-contrast: #fffbf5;
    --hi-oosn-color-accent-soft: rgba(194, 65, 12, 0.08);
    --hi-oosn-color-muted: #92866a;
    --hi-oosn-color-border: #fed7aa;
    --hi-oosn-color-border-strong: #fdba74;
    --hi-oosn-color-bg: #fffbf5;
    --hi-oosn-color-bg-soft: #fff7ed;
    --hi-oosn-color-bg-input: #fffbf5;
    --hi-oosn-color-text: #431407;
    --hi-oosn-color-focus-ring: rgba(194, 65, 12, 0.22);
}

.hi-oosn[data-hi-oosn-scheme="high_contrast"],
.hi-oosn-trigger[data-hi-oosn-scheme="high_contrast"],
.hi-oosn-modal[data-hi-oosn-scheme="high_contrast"],
.hi-oosn-account[data-hi-oosn-scheme="high_contrast"] {
    --hi-oosn-color-accent: #000000;
    --hi-oosn-color-accent-hover: #1f2937;
    --hi-oosn-color-accent-contrast: #ffffff;
    --hi-oosn-color-accent-soft: rgba(0, 0, 0, 0.08);
    --hi-oosn-color-muted: #1f2937;
    --hi-oosn-color-border: #000000;
    --hi-oosn-color-border-strong: #000000;
    --hi-oosn-color-bg: #ffffff;
    --hi-oosn-color-bg-soft: #ffffff;
    --hi-oosn-color-bg-input: #ffffff;
    --hi-oosn-color-text: #000000;
    --hi-oosn-color-focus-ring: rgba(0, 0, 0, 0.35);
}

/* =========================================================================
 * Block
 * ========================================================================= */
.hi-oosn {
    box-sizing: border-box;
    width: 100%;
    margin: 0 0 var(--hi-oosn-spacing-md);
    padding: 0;
    color: var(--hi-oosn-color-text, inherit);
    font-size: var(--hi-oosn-font-size);
    line-height: 1.45;
    text-align: left;
}

.hi-oosn *,
.hi-oosn *::before,
.hi-oosn *::after {
    box-sizing: border-box;
}

.hi-oosn--card {
    background-color: var(--hi-oosn-color-bg);
    border: var(--hi-oosn-border-width) solid var(--hi-oosn-color-border);
    border-radius: var(--hi-oosn-radius);
    padding: var(--hi-oosn-spacing-lg);
}

.hi-oosn--hidden {
    display: none !important;
}

/* =========================================================================
 * Header
 * ========================================================================= */
.hi-oosn__header {
    margin-bottom: var(--hi-oosn-spacing);
}

.hi-oosn__title {
    margin: 0;
    padding: 0;
    color: var(--hi-oosn-color-text, inherit);
    font-size: var(--hi-oosn-font-size-title);
    font-weight: var(--hi-oosn-font-weight-title);
    line-height: 1.3;
    letter-spacing: -0.005em;
}

.hi-oosn__subtitle {
    margin: var(--hi-oosn-spacing-xs) 0 0;
    color: var(--hi-oosn-color-muted);
    font-size: var(--hi-oosn-font-size-sm);
    line-height: 1.45;
}

/* =========================================================================
 * Body / fields
 * ========================================================================= */
.hi-oosn__body {
    display: flex;
    flex-direction: column;
    gap: var(--hi-oosn-spacing);
}

.hi-oosn__fields {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--hi-oosn-spacing-sm);
}

.hi-oosn__fields--with-qty {
    grid-template-columns: auto 1fr;
}

.hi-oosn__field {
    display: flex;
    flex-direction: column;
    gap: var(--hi-oosn-spacing-xs);
    min-width: 0;
}

.hi-oosn__label {
    margin: 0;
    color: var(--hi-oosn-color-muted);
    font-size: var(--hi-oosn-font-size-sm);
    font-weight: 500;
    line-height: 1.2;
}

/* Visually hidden but still announced by screen readers. Kept around as an
   opt-in for themes that prefer to suppress the floating-label entirely. */
.hi-oosn__label--sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* =========================================================================
 * Floating label fields — the label sits inside the input as a placeholder
 * and animates up to the top edge on focus or when the input has a value.
 *
 * Markup contract (set by block.tpl):
 *   <div class="hi-oosn__field hi-oosn__field--floating">
 *     <input class="hi-oosn__input" placeholder=" " ...>
 *     <label class="hi-oosn__label hi-oosn__label--float" for="...">…</label>
 *   </div>
 *
 * The empty-looking `placeholder=" "` is required: without *some* placeholder
 * the `:placeholder-shown` pseudo never matches and the float trick fails.
 * ========================================================================= */
.hi-oosn__field--floating {
    position: relative;
    display: block;
    --hi-oosn-float-padding-top: 1.1rem;
    --hi-oosn-float-padding-bottom: 0.3rem;
    --hi-oosn-float-label-top: 0.5rem;
    --hi-oosn-float-label-size: 0.6875rem;
}

.hi-oosn__field--floating .hi-oosn__input {
    height: calc(var(--hi-oosn-control-height) + 10px);
    padding-top: var(--hi-oosn-float-padding-top);
    padding-bottom: var(--hi-oosn-float-padding-bottom);
}

/* Hide the spec placeholder text — we use the label as the placeholder */
.hi-oosn__field--floating .hi-oosn__input::placeholder {
    color: transparent;
    opacity: 0;
}

.hi-oosn__field--floating .hi-oosn__label--float {
    position: absolute;
    inset-inline-start: var(--hi-oosn-spacing);
    top: 50%;
    transform: translateY(-50%);
    margin: 0;
    padding: 0;
    max-width: calc(100% - var(--hi-oosn-spacing) * 2);
    color: var(--hi-oosn-color-muted);
    /* The label sits over the input; without pointer-events: none, clicks on
       the label area would land on the label instead of the input, which on
       some themes also routes a stray focus event to <body>. Keep clicks
       falling through to the input itself. */
    pointer-events: none;
    font-size: var(--hi-oosn-font-size);
    font-weight: 400;
    line-height: 1;
    text-align: start;
    background: transparent;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition:
        top var(--hi-oosn-transition),
        font-size var(--hi-oosn-transition),
        color var(--hi-oosn-transition),
        font-weight var(--hi-oosn-transition),
        transform var(--hi-oosn-transition);
}

.hi-oosn__field--floating .hi-oosn__input:focus ~ .hi-oosn__label--float,
.hi-oosn__field--floating .hi-oosn__input:not(:placeholder-shown) ~ .hi-oosn__label--float {
    top: var(--hi-oosn-float-label-top);
    transform: translateY(0);
    font-size: var(--hi-oosn-float-label-size);
    font-weight: 500;
    color: var(--hi-oosn-color-accent);
}

.hi-oosn__field--floating.is-invalid .hi-oosn__input:focus ~ .hi-oosn__label--float,
.hi-oosn__field--floating.is-invalid .hi-oosn__input:not(:placeholder-shown) ~ .hi-oosn__label--float {
    color: var(--hi-oosn-color-error);
}

/* Qty cell is centered text. Center its floating label too so the resting
   state matches the value, and keep the floated state aligned with the
   centered numeric. */
.hi-oosn__field--qty.hi-oosn__field--floating .hi-oosn__label--float {
    left: 0;
    right: 0;
    max-width: 100%;
    padding: 0 var(--hi-oosn-spacing-xs);
    text-align: center;
}

.hi-oosn__email-notice {
    display: flex;
    align-items: center;
    gap: 0.4em;
    margin: 0;
    font-size: var(--hi-oosn-font-size-sm);
    line-height: 1.45;
    color: var(--hi-oosn-color-muted);
}

.hi-oosn__email-notice-icon {
    flex-shrink: 0;
    width: 1em;
    height: 1em;
}

.hi-oosn__email-notice-address {
    font-weight: 600;
    color: var(--hi-oosn-color-text);
    word-break: break-all;
}

.hi-oosn__input {
    width: 100%;
    height: var(--hi-oosn-control-height);
    margin: 0;
    padding: 0 var(--hi-oosn-spacing);
    font: inherit;
    color: inherit;
    background-color: var(--hi-oosn-color-bg-input);
    border: var(--hi-oosn-border-width) solid var(--hi-oosn-color-border-strong);
    border-radius: var(--hi-oosn-radius-sm);
    box-shadow: none;
    appearance: none;
    -webkit-appearance: none;
    transition: border-color var(--hi-oosn-transition), box-shadow var(--hi-oosn-transition);
}

.hi-oosn__input::placeholder {
    color: var(--hi-oosn-color-muted);
    opacity: 1;
}

.hi-oosn__input:hover {
    border-color: var(--hi-oosn-color-accent);
}

.hi-oosn__input:focus,
.hi-oosn__input:focus-visible {
    outline: none;
    border-color: var(--hi-oosn-color-accent);
    box-shadow: 0 0 0 3px var(--hi-oosn-color-focus-ring);
}

.hi-oosn__input--qty {
    text-align: center;
    padding: 0 var(--hi-oosn-spacing-xs);
    -moz-appearance: textfield;
}

.hi-oosn__input--qty::-webkit-outer-spin-button,
.hi-oosn__input--qty::-webkit-inner-spin-button {
    appearance: none;
    -webkit-appearance: none;
    margin: 0;
}

.hi-oosn__field.is-invalid .hi-oosn__input {
    border-color: var(--hi-oosn-color-error);
    box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.15);
}

/* =========================================================================
 * Quantity stepper — [−][ N ][+]
 *
 * One self-contained group: the surrounding border lives on the wrapper, the
 * three children sit flush against each other with their own borders removed.
 * The wrapper picks up :focus-within to mirror the input focus ring used
 * elsewhere, so the whole stepper visually focuses as one control.
 * ========================================================================= */
.hi-oosn__stepper {
    --hi-oosn-stepper-btn-size: 2rem;
    --hi-oosn-stepper-input-width: 2rem;

    display: inline-flex;
    align-items: stretch;
    height: calc(var(--hi-oosn-control-height) + 10px);
    background-color: var(--hi-oosn-color-bg-input);
    border: var(--hi-oosn-border-width) solid var(--hi-oosn-color-border-strong);
    border-radius: var(--hi-oosn-radius-sm);
    overflow: hidden;
    transition: border-color var(--hi-oosn-transition), box-shadow var(--hi-oosn-transition);
}

.hi-oosn__stepper:hover {
    border-color: var(--hi-oosn-color-accent);
}

.hi-oosn__stepper:focus-within {
    border-color: var(--hi-oosn-color-accent);
    box-shadow: 0 0 0 3px var(--hi-oosn-color-focus-ring);
}

.hi-oosn__field.is-invalid .hi-oosn__stepper {
    border-color: var(--hi-oosn-color-error);
    box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.15);
}

.hi-oosn__stepper-btn {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--hi-oosn-stepper-btn-size);
    height: 100%;
    padding: 0;
    margin: 0;
    color: inherit;
    background-color: transparent;
    border: 0;
    border-radius: 0;
    font: inherit;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
    transition: background-color var(--hi-oosn-transition), color var(--hi-oosn-transition);
}

.hi-oosn__stepper-btn:hover,
.hi-oosn__stepper-btn:focus {
    background-color: var(--hi-oosn-color-accent-soft);
    color: var(--hi-oosn-color-accent);
}

.hi-oosn__stepper-btn:focus {
    outline: none;
}

.hi-oosn__stepper-btn:focus-visible {
    outline: none;
}

.hi-oosn__stepper-btn[disabled] {
    cursor: not-allowed;
    background-color: transparent;
    color: var(--hi-oosn-color-muted);
    opacity: 0.5;
}

.hi-oosn__stepper-glyph {
    display: inline-block;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1;
}

/* When the qty stepper is the only field (e.g. logged-in customer with
   no email input), stretch it to fill the row instead of sitting compact
   on the left. */
.hi-oosn__qty-label {
    display: none;
}

.hi-oosn__field--qty:only-child {
    flex-direction: row;
    align-items: stretch;
    height: var(--hi-oosn-control-height);
    background-color: var(--hi-oosn-color-bg-input);
    border: var(--hi-oosn-border-width) solid var(--hi-oosn-color-border-strong);
    border-radius: var(--hi-oosn-radius-sm);
    overflow: hidden;
    transition: border-color var(--hi-oosn-transition), box-shadow var(--hi-oosn-transition);
}

.hi-oosn__field--qty:only-child:hover {
    border-color: var(--hi-oosn-color-accent);
}

.hi-oosn__field--qty:only-child:focus-within {
    border-color: var(--hi-oosn-color-accent);
    box-shadow: 0 0 0 3px var(--hi-oosn-color-focus-ring);
}

.hi-oosn__field--qty:only-child .hi-oosn__qty-label {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0 var(--hi-oosn-spacing);
    font-size: var(--hi-oosn-font-size-sm);
    font-weight: 500;
    color: var(--hi-oosn-color-muted);
    white-space: nowrap;
    border-right: var(--hi-oosn-border-width) solid var(--hi-oosn-color-border-strong);
}

.hi-oosn__field--qty:only-child .hi-oosn__stepper {
    display: flex;
    flex: 1 1 auto;
    height: auto;
    border: 0;
    border-radius: 0;
    background-color: transparent;
    box-shadow: none;
}

.hi-oosn__field--qty:only-child .hi-oosn__stepper:hover,
.hi-oosn__field--qty:only-child .hi-oosn__stepper:focus-within {
    border: 0;
    box-shadow: none;
}

.hi-oosn__field--qty:only-child .hi-oosn__input--qty {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
}

/* The number input loses its own chrome — the stepper wrapper owns the
   border, focus ring and background, so the input is only responsible for
   centering and presenting the value. */
.hi-oosn__stepper .hi-oosn__input--qty {
    width: var(--hi-oosn-stepper-input-width);
    height: 100%;
    padding: 0;
    border: 0;
    border-radius: 0;
    background-color: transparent;
    box-shadow: none;
    text-align: center;
    font-size: var(--hi-oosn-font-size-sm);
    font-weight: 500;
}

.hi-oosn__stepper .hi-oosn__input--qty:hover,
.hi-oosn__stepper .hi-oosn__input--qty:focus,
.hi-oosn__stepper .hi-oosn__input--qty:focus-visible {
    border: 0;
    box-shadow: none;
    outline: none;
}

/* =========================================================================
 * Honeypot — visible to bots, off-screen for humans
 * ========================================================================= */
.hi-oosn__honeypot {
    position: absolute !important;
    left: -10000px !important;
    top: auto !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    white-space: nowrap;
}

/* =========================================================================
 * GDPR
 * ========================================================================= */
.hi-oosn__gdpr {
    color: var(--hi-oosn-color-muted);
    font-size: var(--hi-oosn-font-size-sm);
    line-height: 1.45;
}

.hi-oosn-gdpr {
    margin: 0;
}

.hi-oosn-gdpr__row {
    display: flex;
    align-items: flex-start;
    gap: var(--hi-oosn-spacing-sm);
    margin: 0;
    cursor: pointer;
}

.hi-oosn-gdpr__checkbox {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    margin: 2px 0 0;
    accent-color: var(--hi-oosn-color-accent);
    cursor: pointer;
}

.hi-oosn-gdpr__indicator {
    display: none;
}

/* Specificity bumped (chained `.hi-oosn` + explicit children) so theme/
   psgdpr rules on <p>/<span>/<a> can't out-specific our scheme color. */
.hi-oosn .hi-oosn-gdpr__text,
.hi-oosn .hi-oosn-gdpr__text p,
.hi-oosn .hi-oosn-gdpr__text span,
.hi-oosn .hi-oosn-gdpr__text a {
    color: var(--hi-oosn-color-muted);
    font-size: inherit;
    line-height: inherit;
}

.hi-oosn .hi-oosn-gdpr__text a {
    text-decoration: underline;
}

/* =========================================================================
 * Actions / submit button
 * ========================================================================= */
.hi-oosn__actions {
    display: flex;
    flex-direction: column;
    gap: var(--hi-oosn-spacing-sm);
}

.hi-oosn__button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--hi-oosn-spacing-sm);
    width: 100%;
    min-height: var(--hi-oosn-control-height);
    margin: 0;
    padding: 0 var(--hi-oosn-spacing-md);
    font: inherit;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    color: var(--hi-oosn-color-accent-contrast);
    background-color: var(--hi-oosn-color-accent);
    border: var(--hi-oosn-border-width) solid var(--hi-oosn-color-accent);
    border-radius: var(--hi-oosn-radius-sm);
    cursor: pointer;
    box-shadow: none;
    transition:
        background-color var(--hi-oosn-transition),
        border-color var(--hi-oosn-transition),
        color var(--hi-oosn-transition),
        transform var(--hi-oosn-transition);
}

.hi-oosn__button:hover,
.hi-oosn__button:focus {
    background-color: var(--hi-oosn-color-accent-hover);
    border-color: var(--hi-oosn-color-accent-hover);
    color: var(--hi-oosn-color-accent-contrast);
    text-decoration: none;
}

.hi-oosn__button:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--hi-oosn-color-focus-ring);
}

.hi-oosn__button:active {
    transform: translateY(1px);
}

.hi-oosn__button[disabled],
.hi-oosn__button.is-loading {
    cursor: not-allowed;
    opacity: 0.85;
}

.hi-oosn__button-label {
    display: inline-block;
    transition: opacity var(--hi-oosn-transition);
}

.hi-oosn__button-icon {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    transition: opacity var(--hi-oosn-transition);
}

.hi-oosn__spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 18px;
    margin: -9px 0 0 -9px;
    border-radius: 50%;
    border: 2px solid currentColor;
    border-right-color: transparent;
    opacity: 0;
    pointer-events: none;
}

.hi-oosn__button.is-loading .hi-oosn__button-label,
.hi-oosn__button.is-loading .hi-oosn__button-icon {
    opacity: 0;
}

.hi-oosn__button.is-loading .hi-oosn__spinner {
    opacity: 1;
}

@media (prefers-reduced-motion: no-preference) {
    .hi-oosn__button.is-loading .hi-oosn__spinner {
        animation: hi-oosn-spin 0.6s linear infinite;
    }
}

@keyframes hi-oosn-spin {
    to { transform: rotate(360deg); }
}

.hi-oosn__button--link {
    background-color: transparent;
    color: var(--hi-oosn-color-accent);
    border-color: var(--hi-oosn-color-border-strong);
}

.hi-oosn__button--link:hover,
.hi-oosn__button--link:focus {
    background-color: var(--hi-oosn-color-accent-soft);
    color: var(--hi-oosn-color-accent);
    border-color: var(--hi-oosn-color-accent);
}

/* =========================================================================
 * Feedback messages
 * ========================================================================= */
.hi-oosn__feedback {
    margin: 0;
    padding: 0;
    font-size: var(--hi-oosn-font-size-sm);
    line-height: 1.45;
}

.hi-oosn__feedback:empty {
    display: none;
}

.hi-oosn__feedback--error {
    margin-top: var(--hi-oosn-spacing);
    padding: var(--hi-oosn-spacing-sm) var(--hi-oosn-spacing);
    color: var(--hi-oosn-color-error);
    background-color: var(--hi-oosn-color-error-bg);
    border: var(--hi-oosn-border-width) solid var(--hi-oosn-color-error-border);
    border-radius: var(--hi-oosn-radius-sm);
}

/* Success is no longer rendered as a green strip — see `.hi-oosn__success`
   below. The class stays available so external styles/themes don't break. */
.hi-oosn__feedback--success {
    color: var(--hi-oosn-color-success);
}

/* =========================================================================
 * Success state — full panel that replaces the form on success
 *
 * On success the JS sets `.hi-oosn--is-success` on the block and appends a
 * `.hi-oosn__success` panel. CSS hides the form/header/feedback strip and
 * lets the panel (animated check + heading + message) fill the card so the
 * outcome reads as a finished, intentional state instead of a leftover form
 * with a tiny green box.
 * ========================================================================= */
.hi-oosn--is-success .hi-oosn__header,
.hi-oosn--is-success .hi-oosn__body,
.hi-oosn--is-success .hi-oosn__feedback,
.hi-oosn--is-success .hi-oosn__recaptcha {
    display: none !important;
}

.hi-oosn__success {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--hi-oosn-spacing-sm);
    padding: var(--hi-oosn-spacing-md) var(--hi-oosn-spacing-sm);
}

.hi-oosn__success-icon {
    width: 64px;
    height: 64px;
    color: var(--hi-oosn-color-success);
}

.hi-oosn__success-icon svg {
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.hi-oosn__success-icon-circle,
.hi-oosn__success-icon-check {
    fill: none;
    stroke: currentColor;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    transform-origin: center;
}

.hi-oosn__success-icon-circle {
    /* circumference for r=24 ≈ 150.8 — a touch over fully hides the stroke */
    stroke-dasharray: 152;
    stroke-dashoffset: 152;
}

.hi-oosn__success-icon-check {
    stroke-dasharray: 50;
    stroke-dashoffset: 50;
}

.hi-oosn__success-title {
    margin: 0;
    color: var(--hi-oosn-color-text, inherit);
    font-size: var(--hi-oosn-font-size-title);
    font-weight: var(--hi-oosn-font-weight-title);
    line-height: 1.3;
    letter-spacing: -0.005em;
}

.hi-oosn__success-message {
    margin: 0;
    color: var(--hi-oosn-color-muted);
    font-size: var(--hi-oosn-font-size-sm);
    line-height: 1.5;
    max-width: 36ch;
}

@media (prefers-reduced-motion: no-preference) {
    .hi-oosn--is-success .hi-oosn__success-icon-circle {
        animation: hi-oosn-success-circle 480ms cubic-bezier(0.65, 0, 0.45, 1) forwards;
    }

    .hi-oosn--is-success .hi-oosn__success-icon-check {
        animation: hi-oosn-success-check 280ms cubic-bezier(0.65, 0, 0.45, 1) 360ms forwards;
    }

    .hi-oosn--is-success .hi-oosn__success-icon {
        animation: hi-oosn-success-pop 360ms cubic-bezier(0.34, 1.32, 0.64, 1) 480ms both;
    }

    .hi-oosn--is-success .hi-oosn__success-title,
    .hi-oosn--is-success .hi-oosn__success-message {
        animation: hi-oosn-success-rise 320ms cubic-bezier(0.16, 1, 0.3, 1) 520ms both;
    }

    .hi-oosn--is-success .hi-oosn__success-message {
        animation-delay: 600ms;
    }
}

@media (prefers-reduced-motion: reduce) {
    /* No motion — paint the icon directly in its final state. */
    .hi-oosn__success-icon-circle,
    .hi-oosn__success-icon-check {
        stroke-dashoffset: 0;
    }
}

@keyframes hi-oosn-success-circle {
    to { stroke-dashoffset: 0; }
}

@keyframes hi-oosn-success-check {
    to { stroke-dashoffset: 0; }
}

@keyframes hi-oosn-success-pop {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.08); }
    100% { transform: scale(1); }
}

@keyframes hi-oosn-success-rise {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* =========================================================================
 * reCAPTCHA holder
 * ========================================================================= */
.hi-oosn__recaptcha {
    margin: 0;
}

.hi-oosn__recaptcha:empty {
    display: none;
}

.hi-oosn__recaptcha:not(:empty) {
    margin-top: var(--hi-oosn-spacing);
    display: flex;
    justify-content: center;
}

/* =========================================================================
 * Variants
 * ========================================================================= */

/* Popup — modal already provides chrome; lighten the block */
.hi-oosn--popup {
    border: 0;
    background-color: transparent;
    padding: var(--hi-oosn-spacing-lg);
    margin: 0;
}

.hi-oosn--popup .hi-oosn__title {
    font-size: 1.1875rem;
}

.hi-oosn--popup .hi-oosn__header {
    margin-bottom: var(--hi-oosn-spacing-md);
}

/* Inline (e.g. product list / combination row) — compact */
.hi-oosn--inline,
.hi-oosn--combination {
    --hi-oosn-control-height: var(--hi-oosn-control-height-sm);
    --hi-oosn-spacing-lg: var(--hi-oosn-spacing-md);
    --hi-oosn-font-size: var(--hi-oosn-font-size-sm);
    --hi-oosn-font-size-title: 0.9375rem;
}

.hi-oosn--inline .hi-oosn__header,
.hi-oosn--combination .hi-oosn__header {
    margin-bottom: var(--hi-oosn-spacing-sm);
}

/* =========================================================================
 * Trigger (button that opens the popup)
 *
 * Full-width by default — a notify-me CTA reads as a primary action on a
 * product page and looks awkward when it shrinks to its label width. Themes
 * that want auto-width can override `.hi-oosn-trigger { width: auto; }`.
 * ========================================================================= */
.hi-oosn-trigger {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: var(--hi-oosn-control-height);
    padding: 0 var(--hi-oosn-spacing-md);
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    color: var(--hi-oosn-color-accent-contrast);
    background-color: var(--hi-oosn-color-accent);
    border: var(--hi-oosn-border-width) solid var(--hi-oosn-color-accent);
    border-radius: var(--hi-oosn-radius-sm);
    cursor: pointer;
    transition:
        background-color var(--hi-oosn-transition),
        border-color var(--hi-oosn-transition),
        color var(--hi-oosn-transition);
}

.hi-oosn-trigger:hover,
.hi-oosn-trigger:focus {
    background-color: var(--hi-oosn-color-accent-hover);
    border-color: var(--hi-oosn-color-accent-hover);
    color: var(--hi-oosn-color-accent-contrast);
    text-decoration: none;
}

.hi-oosn-trigger:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--hi-oosn-color-focus-ring);
}

.hi-oosn-trigger--hidden {
    display: none !important;
}

/* Busy state — used while the variant picker fetches attributes. We avoid
 * opening any modal during that fetch (no loader popups), so the trigger
 * itself surfaces the in-flight state with a small spinner appended after
 * the label. Pointer events are blocked so the customer can't fire two
 * concurrent requests by double-clicking. */
.hi-oosn-trigger.is-busy {
    cursor: progress;
    pointer-events: none;
    opacity: 0.85;
}

.hi-oosn-trigger.is-busy::after {
    content: '';
    display: inline-block;
    width: 0.875em;
    height: 0.875em;
    margin-left: 0.5em;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    vertical-align: -2px;
    animation: hiOosnTriggerSpin 0.7s linear infinite;
}

@keyframes hiOosnTriggerSpin {
    to { transform: rotate(360deg); }
}

/* =========================================================================
 * Wrappers
 * ========================================================================= */
.hi-oosn-wrap {
    box-sizing: border-box;
    display: block;
    max-width: 100%;
    margin: var(--hi-oosn-spacing-md, 1rem) 0;
}

.hi-oosn-wrap--list {
    margin: var(--hi-oosn-spacing-sm, 0.5rem) 0;
    text-align: center;
}

.hi-oosn-wrap--combination {
    margin: var(--hi-oosn-spacing-sm, 0.5rem) 0;
}

/* Collapse the leftover wrap once the trigger has been lifted onto the image. */
.hi-oosn-wrap--list-overlay {
    margin: 0;
    padding: 0;
    height: 0;
}

.hi-oosn-trigger--list {
    gap: 0.375rem;
    min-height: 0;
    padding: 0.5rem 0.75rem;
    border-radius: var(--hi-oosn-radius-sm);
    font-size: 0.8125rem;
}

.hi-oosn-trigger--list .hi-oosn-trigger__icon {
    width: 14px;
    height: 14px;
    flex: 0 0 auto;
}

/* Positioning context for the overlay trigger (set by front.js on the image). */
.hi-oosn-host {
    position: relative;
    display: block;
}

/* FOUC guard — released once front.js mounts (or downgrades) the trigger. */
.hi-oosn-trigger--list-overlay:not([data-hi-oosn-overlay-mounted]) {
    visibility: hidden;
}

.hi-oosn-trigger--list-overlay {
    position: absolute;
    left: 0.5rem;
    right: 0.5rem;
    bottom: 0.5rem;
    z-index: 3;
    width: auto;
}

/* Suppress the theme's hover-reveal panel on cards where our overlay is
 * mounted — quick-view (and similar slide-up actions) would otherwise be
 * hidden behind our button. The product is OOS, so quick-view's primary
 * action (add-to-cart) is unavailable anyway. Add theme-specific
 * selectors here if a theme uses a different class for its hover panel. */
.hi-oosn-card-has-overlay .highlighted-informations,
.hi-oosn-card-has-overlay .product-miniature__hover {
    display: none !important;
}

.hi-oosn__login-hint {
    margin: 0;
    color: var(--hi-oosn-color-muted, #6b7280);
    font-size: 0.8125rem;
    text-align: center;
}

.hi-oosn__login-link {
    color: inherit;
    text-decoration: underline;
    font-weight: 500;
}

/* =========================================================================
 * Modal — replaces the previous fancybox dependency
 *
 * The trigger is any `<a class="hi-oosn-popup-trigger" href="#some-host-id">…</a>`
 * pointing at a `.hi-oosn-popup-host` block. On open the JS lifts the
 * container into `.hi-oosn-modal__content`; on close it goes back to its
 * original parent. The container is `display: none` while it lives in the
 * page DOM and `display: block` while it lives in the modal — that's the
 * only switch the modal needs to do; everything else is CSS.
 * ========================================================================= */
.hi-oosn-popup-host {
    display: none;
}

.hi-oosn-modal-open {
    overflow: hidden;
}

/* The modal lives at <body> level, so it's outside the `.hi-oosn` scope that
   sets `box-sizing: border-box`. We re-apply it here explicitly so the
   padding we put on the wrapper does NOT push the box past the viewport
   edges — which used to leave the backdrop short on one side and the dialog
   pinned to the left. We also use long-hand top/right/bottom/left instead of
   `inset: 0` for the broadest browser support. */
.hi-oosn-modal,
.hi-oosn-modal *,
.hi-oosn-modal *::before,
.hi-oosn-modal *::after {
    box-sizing: border-box;
}

/* Always rendered (display: block) but hidden via visibility + pointer-events
   so the dialog's enter animation paints from the very first frame. Using
   `display: none` here would let the browser skip the start state of the
   keyframes when we toggle to `is-open`. */
.hi-oosn-modal {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 2147483646;
    margin: 0;
    padding: 0;
    overflow: hidden;
    color: var(--hi-oosn-color-text, #1f2937);
    font-size: var(--hi-oosn-font-size, 0.9375rem);
    line-height: 1.45;
    text-align: left;
    visibility: hidden;
    pointer-events: none;
}

.hi-oosn-modal.is-open,
.hi-oosn-modal.is-closing {
    visibility: visible;
    pointer-events: auto;
}

.hi-oosn-modal__backdrop {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    background-color: rgba(17, 24, 39, 0.55);
    opacity: 0;
    -webkit-backdrop-filter: blur(0);
            backdrop-filter: blur(0);
    cursor: pointer;
}

/* Open + close animations are keyframes (not transitions) so they always play
   when the class is added — no display:none gotchas, no theme `transition`
   overrides to fight. */
.hi-oosn-modal.is-open .hi-oosn-modal__backdrop {
    animation: hi-oosn-backdrop-in 280ms ease-out forwards;
}

.hi-oosn-modal.is-closing .hi-oosn-modal__backdrop {
    animation: hi-oosn-backdrop-out 200ms ease-in forwards;
}

@keyframes hi-oosn-backdrop-in {
    from {
        opacity: 0;
        -webkit-backdrop-filter: blur(0);
                backdrop-filter: blur(0);
    }
    to {
        opacity: 1;
        -webkit-backdrop-filter: blur(4px);
                backdrop-filter: blur(4px);
    }
}

@keyframes hi-oosn-backdrop-out {
    from {
        opacity: 1;
        -webkit-backdrop-filter: blur(4px);
                backdrop-filter: blur(4px);
    }
    to {
        opacity: 0;
        -webkit-backdrop-filter: blur(0);
                backdrop-filter: blur(0);
    }
}

/* Scroll wrapper — sits above the backdrop and centers the dialog using
   a flex layout that gracefully degrades to top-aligned scroll for very
   tall content. Using a dedicated wrapper (instead of putting flex on
   the root) keeps the backdrop's full-viewport coverage independent of
   the dialog layout. */
.hi-oosn-modal__viewport {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: var(--hi-oosn-spacing-md, 1rem);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hi-oosn-modal__dialog {
    position: relative;
    z-index: 1;
    flex: 0 0 auto;
    width: 100%;
    max-width: 460px;
    margin: auto;
    padding: 0;
    background-color: var(--hi-oosn-color-bg, #ffffff);
    color: inherit;
    border-radius: var(--hi-oosn-radius, 10px);
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.06),
        0 20px 60px rgba(17, 24, 39, 0.25);
    opacity: 0;
    transform: translateY(24px) scale(0.92);
    transform-origin: center top;
    /* Defensive resets: themes love to ship .modal-style global rules */
    float: none;
    text-align: left;
}

/* Soft, slightly springy enter — the dialog rises from below and overshoots
   a touch before settling. Driven by an animation (not a transition) so it
   always plays the first time the class lands on the element. */
.hi-oosn-modal.is-open .hi-oosn-modal__dialog {
    animation: hi-oosn-dialog-in 380ms cubic-bezier(0.34, 1.42, 0.64, 1) forwards;
}

/* Quick, decisive exit — fades out and shrinks slightly. */
.hi-oosn-modal.is-closing .hi-oosn-modal__dialog {
    animation: hi-oosn-dialog-out 220ms cubic-bezier(0.4, 0, 0.6, 1) forwards;
}

@keyframes hi-oosn-dialog-in {
    0% {
        opacity: 0;
        transform: translateY(24px) scale(0.92);
    }
    60% {
        opacity: 1;
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes hi-oosn-dialog-out {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(8px) scale(0.97);
    }
}

/* The dialog wrapper receives focus on open (tabindex="-1") so screen readers
   announce it and Tab cycles inside. We don't want a focus ring on the panel
   itself — keyboard users still get a ring on the actual focusable elements. */
.hi-oosn-modal__dialog:focus,
.hi-oosn-modal__dialog:focus-visible {
    outline: none;
}

.hi-oosn-modal__close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    margin: 0;
    color: var(--hi-oosn-color-muted, #6b7280);
    background-color: transparent;
    border: 0;
    border-radius: 50%;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    transition:
        background-color var(--hi-oosn-transition, 150ms ease),
        color var(--hi-oosn-transition, 150ms ease);
}

.hi-oosn-modal__close:hover,
.hi-oosn-modal__close:focus {
    color: var(--hi-oosn-color-accent, #111827);
    background-color: var(--hi-oosn-color-accent-soft, rgba(17, 24, 39, 0.06));
}

.hi-oosn-modal__close:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--hi-oosn-color-focus-ring, rgba(17, 24, 39, 0.18));
}

.hi-oosn-modal__content {
    padding: var(--hi-oosn-spacing-lg, 1.25rem);
    margin: 0;
}

/* Inside the modal, the popup container that was hidden in the page now
   needs to render. We scope this strictly to `.hi-oosn-modal__content` so
   nothing else in the page changes. */
.hi-oosn-modal__content .hi-oosn-popup-host,
.hi-oosn-modal__content .hi-oosn-popup-host > .hi-oosn {
    display: block;
    width: 100%;
    margin: 0;
}

/* The popup variant of the block already drops its own card chrome — strip
   the extra padding so the modal's own padding is the source of truth. */
.hi-oosn-modal__content .hi-oosn--popup {
    padding: 0;
}

.hi-oosn-modal__content .hi-oosn__header {
    /* Nudge the header to the right so it doesn't crash into the close
       button at small dialog widths. */
    padding-right: 2.25rem;
}

@media (prefers-reduced-motion: reduce) {
    /* Skip the animations and paint the open/closed states instantly. */
    .hi-oosn-modal.is-open .hi-oosn-modal__backdrop,
    .hi-oosn-modal.is-open .hi-oosn-modal__dialog,
    .hi-oosn-modal.is-closing .hi-oosn-modal__backdrop,
    .hi-oosn-modal.is-closing .hi-oosn-modal__dialog {
        animation: none;
    }
    .hi-oosn-modal.is-open .hi-oosn-modal__backdrop {
        opacity: 1;
    }
    .hi-oosn-modal.is-open .hi-oosn-modal__dialog {
        opacity: 1;
        transform: none;
    }
}

/* =========================================================================
 * Responsive
 * ========================================================================= */
@media (max-width: 480px) {
    .hi-oosn--card {
        padding: var(--hi-oosn-spacing-md);
    }

    .hi-oosn__fields--with-qty {
        grid-template-columns: 1fr;
    }

    .hi-oosn__stepper {
        display: flex;
        width: 100%;
    }

    .hi-oosn__stepper .hi-oosn__input--qty {
        flex: 1 1 auto;
        width: auto;
        min-width: 0;
    }

    .hi-oosn-modal__viewport {
        padding: var(--hi-oosn-spacing-sm);
    }

    .hi-oosn-modal__content {
        padding: var(--hi-oosn-spacing-md);
    }
}

/* Classic theme: stack the icon above the label like every other
   dashboard tile (via `.link-item .material-icons`). */
.hi-oosn-account-link__icon {
    display: block;
    width: 3rem;
    height: 3rem;
    margin: 0 auto 0.5rem;
    color: currentColor;
}

/* Hummingbird theme: the SVG icon sits inside `.account-menu__icon`
   which sizes material-icons via font-size. Override for SVG. */
.account-menu .hi-oosn-account-link__icon {
    display: block;
    width: 2rem;
    height: 2rem;
    margin: 0;
}

/* Hummingbird wraps nothing in `.link-item`, so hide that layer
   and let the link's own flex handle layout. */
.account-menu .hi-oosn-account-link > .link-item {
    display: contents;
}

/* Neutralise Bootstrap column classes that classic theme needs but
   conflict with Hummingbird's CSS-grid account menu. */
.account-menu .hi-oosn-account-link[class*="col-"] {
    width: auto;
    max-width: none;
    flex: none;
    float: none;
}

/* =========================================================================
 * Reduced motion
 * ========================================================================= */
@media (prefers-reduced-motion: reduce) {
    .hi-oosn__input,
    .hi-oosn__button,
    .hi-oosn-trigger,
    .hi-oosn__label--float {
        transition: none;
    }
}

/* =========================================================================
 * Variant picker (.hi-oosn-picker)
 *
 * Rendered by views/js/picker.js as a dropdown section embedded inside the
 * standard `.hi-oosn` subscription form. The same layout is used on every
 * surface (product list, product page, "My subscriptions" suggestion card)
 * — the host form supplies the email/qty/GDPR/submit chrome, the picker
 * adds one full-width dropdown per attribute group.
 *
 * Groups reveal progressively: the first one is visible up front and each
 * subsequent group fades + slides in as the previous one is filled. When
 * the customer changes a higher-up dropdown the lower groups collapse
 * back so the form never carries stale selections.
 * ========================================================================= */
.hi-oosn-picker--embedded {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hi-oosn-picker__groups {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hi-oosn-picker__group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow: hidden;
}

.hi-oosn-picker__group--hidden {
    display: none;
}

.hi-oosn-picker__group--enter {
    animation: hi-oosn-picker-enter 280ms cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

@keyframes hi-oosn-picker-enter {
    0% {
        opacity: 0;
        transform: translateY(-6px);
        max-height: 0;
    }
    60% {
        max-height: 200px;
    }
    100% {
        opacity: 1;
        transform: translateY(0);
        max-height: 200px;
    }
}

.hi-oosn-picker__group-label {
    display: block;
    margin: 0;
    padding: 0;
    font-size: var(--hi-oosn-font-size-sm, 0.8125rem);
    font-weight: 600;
    line-height: 1.3;
    color: var(--hi-oosn-color-text, #374151);
    /* Themes (incl. PS classic) right-align <label> in form contexts;
       force start-aligned so the picker reads naturally inside the modal. */
    text-align: start;
}

.hi-oosn-picker__select-wrap {
    position: relative;
    display: block;
}

.hi-oosn-picker__select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 100%;
    padding: 10px 36px 10px 12px;
    border: 1px solid var(--hi-oosn-color-border, #d1d5db);
    border-radius: var(--hi-oosn-radius-sm, 8px);
    background-color: var(--hi-oosn-color-bg-input, #ffffff);
    color: var(--hi-oosn-color-text, #1f2937);
    font-size: var(--hi-oosn-font-size, 0.9375rem);
    line-height: 1.4;
    cursor: pointer;
    transition: border-color var(--hi-oosn-transition, 120ms ease),
                box-shadow var(--hi-oosn-transition, 120ms ease);
}

.hi-oosn-picker__select:hover {
    border-color: var(--hi-oosn-color-border-strong, #6b7280);
}

.hi-oosn-picker__select:focus {
    outline: none;
    border-color: var(--hi-oosn-color-accent, #111827);
    box-shadow: 0 0 0 3px var(--hi-oosn-color-focus-ring, rgba(17, 24, 39, 0.1));
}

.hi-oosn-picker__select-chevron {
    position: absolute;
    top: 50%;
    right: 12px;
    width: 10px;
    height: 10px;
    pointer-events: none;
    border-right: 2px solid var(--hi-oosn-color-muted, #6b7280);
    border-bottom: 2px solid var(--hi-oosn-color-muted, #6b7280);
    transform: translateY(-70%) rotate(45deg);
}

.hi-oosn-picker__status {
    margin: 0;
    color: var(--hi-oosn-color-muted, #6b7280);
    font-size: var(--hi-oosn-font-size-sm, 0.8125rem);
    min-height: 1.2em;
}

/* "View product" CTA — back-in-stock case. Uses the semantic success
 * tokens so it reads as a positive action distinct from the accent
 * "Notify me" submit, and stays legible across all schemes. */
.hi-oosn__button.hi-oosn__button--view {
    background-color: var(--hi-oosn-color-success, #047857);
    border-color: var(--hi-oosn-color-success, #047857);
    color: var(--hi-oosn-color-accent-contrast, #ffffff);
    text-decoration: none;
}

.hi-oosn__button.hi-oosn__button--view:hover,
.hi-oosn__button.hi-oosn__button--view:focus {
    background-color: var(--hi-oosn-color-success-border, #065f46);
    border-color: var(--hi-oosn-color-success-border, #065f46);
    color: var(--hi-oosn-color-accent-contrast, #ffffff);
    text-decoration: none;
}

/* ---- Error fallback ------------------------------------------------------ */
.hi-oosn-picker--error {
    padding: 16px 0;
    text-align: center;
}

.hi-oosn-picker__error-message {
    margin: 0;
    color: var(--hi-oosn-color-error, #dc2626);
    font-size: var(--hi-oosn-font-size, 0.9375rem);
}

@media (prefers-reduced-motion: reduce) {
    .hi-oosn-picker__select {
        transition: none;
    }
    .hi-oosn-picker__group--enter {
        animation: none;
    }
}
