@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

/* ═══════════════════════════════════════════════════
   Prisberegner v2 – Wizard styles

   Layout uses WordPress block classes (wp-block-columns,
   wp-block-column) for theme independence. All custom UI
   components use lgbx-* prefixed classes.
   ═══════════════════════════════════════════════════ */

/* ── Full-page grey background on prisberegner page ── */
body.lgbx-prisberegner-page,
body.lgbx-prisberegner-page #theme-page,
body.lgbx-prisberegner-page #theme-page-bg,
body.lgbx-prisberegner-page .master-holder,
body.lgbx-prisberegner-page .master-holder-bg-holder,
body.lgbx-prisberegner-page .mk-main-wrapper-holder,
body.lgbx-prisberegner-page .theme-content {
    background: #fafafa !important;
}

/* ── Design tokens ── */
.lgbx-wizard {
    --lgbx-primary:      #0071e3;
    --lgbx-primary-dark: #0064cc;
    --lgbx-success:      #0d9f6e;
    --lgbx-danger:       #e02424;
    --lgbx-text:         #1d1d1f;
    --lgbx-muted:        #6e6e73;
    --lgbx-border:       #fafafa;
    --lgbx-border-focus: #0071e3;
    --lgbx-bg:           #ffffff;
    --lgbx-bg-alt:       #f5f5f7;
    --lgbx-radius:       12px;
    --lgbx-radius-sm:    6px;
    --lgbx-shadow:       0 1px 4px rgba(0, 0, 0, .07), 0 0 0 1px rgba(0, 0, 0, .04);
    --lgbx-shadow-md:    0 4px 12px rgba(0, 0, 0, .09), 0 0 0 1px rgba(0, 0, 0, .04);
    --lgbx-t:            180ms ease;
}

/* ── Container ── */
.lgbx-wizard {
    position: relative;

    /* Full-bleed: break out of theme container to viewport edges */
    margin-left: calc(-50vw + 50%);
    width: 100vw;
    max-width: 100vw;
    box-sizing: border-box;
    border-radius: 0;

    /* Pad content inward so it stays at the original horizontal position */
    padding: 1.75rem max(1.5rem, calc(50vw - 50% + 1.5rem)) 1.5rem;

    /* Background with subtle grid texture */
    background-color: #f5f5f7;
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.04) 1px, transparent 1px);
    background-size: 32px 32px;

    color: var(--lgbx-text);
    font-size: 1rem;
    line-height: 1.6;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ── Font override — ensure Inter on all wizard elements ── */
#lgbx-wizard,
#lgbx-wizard *,
.lgbx-wizard,
.lgbx-wizard * {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ── Theme resets ── */
.lgbx-wizard input[type="text"],
.lgbx-wizard input[type="date"],
.lgbx-wizard input[type="number"],
.lgbx-wizard select,
.lgbx-wizard label,
.lgbx-wizard .lgbx-field,
.lgbx-wizard .lgbx-field-row {
    float: none !important;
    clear: none !important;
}
.lgbx-wizard input[type="text"],
.lgbx-wizard input[type="date"],
.lgbx-wizard input[type="number"],
.lgbx-wizard select {
    box-sizing: border-box;
    padding: 0.5rem 0.875rem;
    font-size: 0.9375rem;
    line-height: 1.5;
}

/* ═══════════════════════════════════════════════════
   Two-column layout
   ═══════════════════════════════════════════════════ */

.lgbx-wizard__columns {
    display: flex;
    gap: 1.75rem;
    align-items: flex-start;
}
.lgbx-wizard__main {
    flex: 1 1 0%;
    min-width: 0;
}
.lgbx-wizard__sidebar {
    flex: 0 0 320px;
    max-width: 320px;
    align-self: flex-start;
    position: sticky;
    top: 1.5rem;
}

/* ═══════════════════════════════════════════════════
   Step cards
   ═══════════════════════════════════════════════════ */

.lgbx-wizard__step {
    background: var(--lgbx-bg);
    border: 1px solid var(--lgbx-border);
    border-radius: var(--lgbx-radius);
    padding: 1.5rem;
    margin-bottom: 1.25rem;
    transition: border-color var(--lgbx-t);
}
.lgbx-wizard__step:focus-within {
    border-color: #c7d8ee;
}

/* ── Legacy panel (kept for backward compat with JS) ── */
.lgbx-wizard__panel {
    display: none;
}
.lgbx-wizard__panel.is-active {
    display: flex;
}
.lgbx-wizard__steps {
    display: none;
}

/* ── Section header row ── */
.lgbx-wizard__section-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 1rem;
}
.lgbx-wizard__section-header-row h3 {
    flex: 1;
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1d1d1f;
    text-transform: none !important;
}

/* Sub-section headers inside step 4 */
.lgbx-wizard__section-header-row--sub {
    margin-top: 1.25rem;
}
.lgbx-wizard__section-header-row--sub h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--lgbx-muted);
    text-transform: none !important;
    letter-spacing: normal;
}

/* Helper hint text */
.lgbx-wizard__hint {
    margin: -0.25rem 0 1rem;
    font-size: 0.875rem;
    color: var(--lgbx-muted);
}

/* ═══════════════════════════════════════════════════
   Department row: label + pill selector in one line
   ═══════════════════════════════════════════════════ */

.lgbx-dept-row {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    margin-bottom: 0;
    flex-wrap: wrap;
}
.lgbx-dept-row__label {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    white-space: nowrap;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--lgbx-muted);
    flex-shrink: 0;
}

/* Info toggle button */
.lgbx-info-btn {
    background: none;
    border: none;
    padding: 0;
    margin-left: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
}
.lgbx-info-btn:hover {
    opacity: 0.75;
}

/* Collapsible info box with slide-down animation */
.lgbx-info-box-collapsible {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    font-size: 0.9em;
    color: #1d1d1f;
    background: #f5f5f7;
    border: none;
    border-radius: 10px;
    padding: 0 14px;
    margin-bottom: 0;
    transition: max-height 0.28s ease, opacity 0.22s ease, padding 0.22s ease, margin 0.22s ease;
    line-height: 1.5;
}
.lgbx-info-box-collapsible.is-open {
    max-height: 120px;
    opacity: 1;
    padding: 12px 14px;
    margin-bottom: 0.5rem;
}

/* Department pill selector */
.lgbx-dept-selector {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.lgbx-dept-pill {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #d2d2d7;
    border-radius: 10px;
    padding: 0.5rem 0.875rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: #1d1d1f;
    background: #fff;
    transition: border-color var(--lgbx-t), background var(--lgbx-t);
    user-select: none;
    line-height: 1.4;
}
/* Radio circle via pseudo-element */
.lgbx-dept-pill::before {
    content: "";
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #d2d2d7;
    background: #fff;
    box-sizing: border-box;
    transition: border-color var(--lgbx-t), background var(--lgbx-t);
}
.lgbx-dept-pill input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.lgbx-dept-pill.is-active {
    background: rgba(0, 113, 227, 0.06);
    border: 1.5px solid #0071e3;
}
.lgbx-dept-pill.is-active::before {
    border-color: #0071e3;
    background: #0071e3;
    box-shadow: inset 0 0 0 3px #fff;
}
.lgbx-dept-pill:hover:not(.is-active) {
    border-color: #0071e3;
}

.lgbx-dept-address {
    display: none;
}

.lgbx-department-address {
    font-size: 0.85rem;
    color: #6e6e73;
    margin-top: 8px;
    margin-bottom: 0;
}

/* ── Locked step ── */
.lgbx-step-locked {
    opacity: 0.4;
    pointer-events: none;
    user-select: none;
}

/* ── Card step badge ── */
.lgbx-step-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #0071e3;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1;
    vertical-align: middle;
    margin-right: 10px;
    flex-shrink: 0;
}
.lgbx-step-badge__num {
    display: block;
    line-height: 1;
}
.lgbx-step-badge__check {
    display: none;
}
.lgbx-step-badge.is-done {
    background: #0d9f6e;
}
.lgbx-step-badge.is-done .lgbx-step-badge__num {
    display: none;
}
.lgbx-step-badge.is-done .lgbx-step-badge__check {
    display: block;
}

/* ── Box count card: title top, stepper bottom ── */
#lgbx_step_2 {
    padding-top: 1.5rem;
    padding-bottom: 1rem;
    display: flex;
    flex-direction: column;
    min-height: 420px;
}
#lgbx_step_2 .lgbx-qty-stepper {
    margin-top: 2rem;
    margin-bottom: 0;
}

/* ── Dept card: compact sizing ── */
#lgbx_step_dept {
    padding: 0.875rem 1.25rem 0;
    margin-bottom: 0.75rem;
}
#lgbx_step_dept .lgbx-wizard__section-header-row {
    margin-bottom: 0.75rem;
}

/* ═══════════════════════════════════════════════════
   Agreement card selector (Dropbox-inspired)
   ═══════════════════════════════════════════════════ */

.lgbx-agree-cards {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 0.75rem;
}

/* Card = lgbx-agree-pill (kept for JS compatibility) */
.lgbx-agree-pill {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    background: #fff;
    border: 1px solid #d2d2d7;
    border-radius: 10px;
    padding: 0.5rem 0.875rem;
    transition: border-color 180ms ease, background 180ms ease, margin-bottom 0.28s ease;
    user-select: none;
    position: relative;
}

/* Reserve space below selected card when description is visible */
.lgbx-agree-pill:has(.lgbx-agree-card__desc.is-open) {
    margin-bottom: 70px;
}

/* Row: radio circle + name + price on one line */
.lgbx-agree-card__row {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}
.lgbx-agree-pill input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* Custom radio circle */
.lgbx-agree-card__radio {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #d1d5db;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 180ms ease, background 180ms ease;
}
.lgbx-agree-card__radio::after {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #fff;
    opacity: 0;
    transition: opacity 180ms ease;
}

/* Name + badge */
.lgbx-agree-card__name {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    font-size: 15px;
    color: var(--lgbx-text);
}

/* Price (right-aligned, populated by JS) */
.lgbx-agree-card__price {
    font-weight: 600;
    font-size: 15px;
    color: var(--lgbx-text);
    white-space: nowrap;
}

/* Description — absolutely positioned below the card so all cards stay same height */
.lgbx-agree-card__desc {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    max-width: 90%;
    margin-left: auto;
    margin-right: auto;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    font-size: 0.9em;
    color: #1d1d1f;
    line-height: 1.5;
    background: transparent;
    padding: 0;
    transition: max-height 0.28s ease, opacity 0.22s ease, padding 0.22s ease;
    box-sizing: border-box;
}
.lgbx-agree-card__desc.is-open {
    max-height: 300px;
    overflow: visible;
    opacity: 1;
    padding: 0.5rem 0 8px;
}

/* Selected state */
.lgbx-agree-pill.is-selected {
    background: rgba(0, 113, 227, 0.06);
    border: 1.5px solid #0071e3;
    box-shadow: none;
}
.lgbx-agree-pill.is-selected .lgbx-agree-card__radio {
    border-color: #0071e3;
    background: #0071e3;
}
.lgbx-agree-pill.is-selected .lgbx-agree-card__radio::after {
    opacity: 1;
}

/* Hover */
.lgbx-agree-pill:hover:not(.is-selected) {
    border-color: #0071e3;
}

/* Campaign badge — green pill inline beside name */
.lgbx-agree-pill .lgbx-badge--combined {
    position: static;
    background: #dcfce7;
    color: #16a34a;
    font-size: 11px;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 100px;
    line-height: 1.4;
    letter-spacing: 0;
    white-space: nowrap;
}

/* ═══════════════════════════════════════════════════
   Box count — +/- stepper (all screen sizes)
   ═══════════════════════════════════════════════════ */

.lgbx-qty-stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    border-radius: 12px;
    background: #f9f9fb;
    padding: 6px;
    width: 200px;
    margin: 0.5rem auto 0.75rem;
}
.lgbx-qty-btn {
    background: #fff;
    border: 1.5px solid #d2d2d7;
    border-radius: 8px;
    width: 48px;
    height: 48px;
    font-size: 1.5rem;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
    color: var(--lgbx-primary);
    transition: background var(--lgbx-t), border-color var(--lgbx-t);
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    flex-shrink: 0;
}
.lgbx-qty-btn:hover:not(:disabled) {
    background: #f0f5ff;
    border-color: #0071e3;
}
.lgbx-qty-btn:active {
    background: #e0ecff;
}
.lgbx-qty-btn:disabled {
    color: var(--lgbx-muted);
    opacity: 0.4;
    cursor: default;
}
.lgbx-qty-display {
    flex: 1;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    padding: 0.25rem;
    min-width: 48px;
    color: var(--lgbx-text);
    line-height: 1.2;
}

/* ═══════════════════════════════════════════════════
   Carry help person cards
   ═══════════════════════════════════════════════════ */

.lgbx-carry-cards {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}
.lgbx-carry-card {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border: 1px solid #d2d2d7;
    border-radius: 10px;
    padding: 0.5rem 0.875rem;
    transition: border-color 180ms ease, background 180ms ease;
    user-select: none;
    font-weight: 500;
    font-size: 15px;
    color: var(--lgbx-text);
}
.lgbx-carry-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.lgbx-carry-card__radio {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #d1d5db;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 180ms ease, background 180ms ease;
}
.lgbx-carry-card__radio::after {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #fff;
    opacity: 0;
    transition: opacity 180ms ease;
}
.lgbx-carry-card__name {
    flex: 1;
}
.lgbx-carry-card.is-selected {
    background: rgba(0, 113, 227, 0.06);
    border: 1.5px solid #0071e3;
    box-shadow: none;
}
.lgbx-carry-card.is-selected .lgbx-carry-card__radio {
    border-color: #0071e3;
    background: #0071e3;
}
.lgbx-carry-card.is-selected .lgbx-carry-card__radio::after {
    opacity: 1;
}
.lgbx-carry-card:hover:not(.is-selected) {
    border-color: #0071e3;
}

/* Keep original styles for wp-block-buttons outside carry section */
.lgbx-wizard .wp-block-button {
    cursor: pointer;
}
.lgbx-wizard .wp-block-button .wp-block-button__link {
    border-radius: var(--lgbx-radius-sm);
    padding: 0.55rem 1.1rem;
    font-size: 0.9375rem;
    font-weight: 600;
    transition: background var(--lgbx-t), color var(--lgbx-t), border-color var(--lgbx-t);
    background-color: var(--lgbx-primary);
    border: 2px solid var(--lgbx-primary);
    color: #fff;
}
.lgbx-wizard .wp-block-button.is-style-outline .wp-block-button__link {
    background-color: transparent;
    color: var(--lgbx-primary);
    border-color: var(--lgbx-border);
}
.lgbx-wizard .wp-block-button.is-style-outline .wp-block-button__link:hover {
    border-color: var(--lgbx-primary);
    background-color: rgba(29, 111, 184, 0.06);
}
.lgbx-wizard .wp-block-button input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    appearance: none;
    -webkit-appearance: none;
}

/* ═══════════════════════════════════════════════════
   Option cards (agreement type)
   ═══════════════════════════════════════════════════ */

.lgbx-wizard__options {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.lgbx-wizard__options--stacked {
    flex-direction: column;
}
.lgbx-wizard__options--horizontal {
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
}

.lgbx-wizard__option {
    flex: 1;
    min-width: 160px;
    cursor: pointer;
    border: 2px solid var(--lgbx-border);
    border-radius: var(--lgbx-radius-sm);
    padding: 1rem;
    transition: border-color var(--lgbx-t), box-shadow var(--lgbx-t), background var(--lgbx-t);
    background: var(--lgbx-bg);
    position: relative; /* needed for absolute sale badge */
}

/* Campaign badge — single combined pill, top-right of each option card */
.lgbx-badge--combined {
    display: none;
    position: absolute;
    top: -1px;
    right: -1px;
    background: #1e3a5f;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1;
    padding: 0.22em 0.55em;
    border-radius: var(--lgbx-radius-sm);
    white-space: nowrap;
    letter-spacing: 0.04em;
    pointer-events: none;
}
.lgbx-wizard__option:hover {
    border-color: var(--lgbx-primary);
    box-shadow: 0 0 0 3px rgba(29, 111, 184, 0.1);
}
.lgbx-wizard__option.is-selected {
    border-color: var(--lgbx-primary);
    background: rgba(29, 111, 184, 0.04);
    box-shadow: 0 0 0 3px rgba(29, 111, 184, 0.12);
}
.lgbx-wizard__options--stacked
    .lgbx-wizard__option:not(.is-selected)
    span.lgbx-wizard__option-inner
    small {
    display: none;
}
.lgbx-wizard__option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.lgbx-wizard__option-inner strong {
    display: block;
    font-weight: 600;
    font-size: 0.9375rem;
}
.lgbx-wizard__option-inner small {
    display: block;
    font-size: 0.83em;
    line-height: 1.4;
    color: var(--lgbx-muted);
    margin-top: 0.2rem;
}
.lgbx-wizard__option-badge {
    display: inline-block;
    background: var(--lgbx-primary);
    color: #fff;
    font-size: 0.68em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.2em 0.55em;
    border-radius: 4px;
    margin-bottom: 0.4em;
}

/* Decorative info icon — same visual as .lgbx-info-btn but non-interactive */
.lgbx-info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #3d4a5c;
    font-size: 11px;
    font-style: italic;
    font-weight: 700;
    font-family: Georgia, serif;
    color: #fff;
    pointer-events: none;
    margin-top: 0.1em;
}

/* ── Agreement variation description info box ── */
.lgbx-agreement-info-box {
    display: flex;
    gap: 0.6rem;
    align-items: flex-start;
    background: #f5f5f7;
    border: none;
    border-radius: 10px;
    padding: 12px 14px;
    margin-top: 0.5rem;
    font-size: 0.9em;
    line-height: 1.5;
    color: #1d1d1f;
}
.lgbx-agreement-info-box__text {
    flex: 1;
}

/* ═══════════════════════════════════════════════════
   Box info (image + description)
   ═══════════════════════════════════════════════════ */

.lgbx-box-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.6rem;
    margin-top: 1rem;
}
.lgbx-box-info__image {
    width: 420px;
    max-width: 100%;
    height: auto;
}
.lgbx-box-info__text {
    font-size: 0.9em;
    line-height: 1.5;
    color: #1d1d1f;
}
.lgbx-box-info__text strong {
    display: block;
    margin-bottom: 0.15em;
    color: var(--lgbx-text);
    font-weight: 600;
}

/* Multibox discount notice */
.lgbx-multibox-badge {
    background: #dbeafe;
    color: #1e40af;
    border-radius: 100px;
    padding: 4px 12px;
    font-size: 0.85rem;
    font-weight: 500;
}

#lgbx_multibox_text {
    font-size: 0.875rem;
    color: var(--lgbx-success);
    font-weight: 500;
    background: rgba(13, 159, 110, 0.07);
    border: 1px solid rgba(13, 159, 110, 0.2);
    border-radius: var(--lgbx-radius-sm);
    padding: 0.5rem 0.75rem;
    margin: 0.5rem 0 0;
}

/* ═══════════════════════════════════════════════════
   Delivery mode options (expandable cards)
   ═══════════════════════════════════════════════════ */

.lgbx-delivery-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 0.75rem;
}

/* Outer card container */
.lgbx-delivery-option {
    background: #fff;
    border: 1px solid #d2d2d7;
    border-radius: 10px;
    transition: border-color 180ms ease, background 180ms ease;
    overflow: hidden;
}
.lgbx-delivery-option.is-selected {
    background: rgba(0, 113, 227, 0.06);
    border: 1.5px solid #0071e3;
    box-shadow: none;
}
.lgbx-delivery-option:hover:not(.is-selected) {
    border-color: #0071e3;
}

/* Header label row */
.lgbx-delivery-option__header {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.625rem 0.875rem;
    user-select: none;
}
.lgbx-delivery-option__header input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* Emoji icon */
.lgbx-delivery-option__icon {
    font-size: 1.5rem;
    line-height: 1;
    flex-shrink: 0;
}
.lgbx-delivery-card__name {
    flex: 1;
    font-weight: 500;
    font-size: 15px;
    color: var(--lgbx-text);
}

/* Expandable body */
.lgbx-delivery-option__body {
    padding: 0 0.875rem 0.875rem;
}

/* ═══════════════════════════════════════════════════
   Form fields
   ═══════════════════════════════════════════════════ */

.lgbx-field {
    position: relative;
    margin-bottom: 0.6rem;
}
.lgbx-field label {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--lgbx-text);
}
.lgbx-field label abbr {
    text-decoration: none;
    color: var(--lgbx-danger);
    margin-left: 1px;
}
.lgbx-field--wide {
    width: 100%;
}
.lgbx-field-row {
    display: grid;
    grid-template-columns: 55% 1fr;
    gap: 0.5rem;
    margin-bottom: 0.6rem;
}
.lgbx-input {
    display: block;
    width: 100%;
    padding: 0.5rem 0.875rem;
    font-size: 0.9375rem;
    line-height: 1.5;
    border: 1.5px solid var(--lgbx-border);
    border-radius: var(--lgbx-radius-sm);
    background: var(--lgbx-bg);
    color: var(--lgbx-text);
    box-sizing: border-box;
    transition: border-color var(--lgbx-t), box-shadow var(--lgbx-t);
}
.lgbx-input:focus {
    outline: none;
    border-color: var(--lgbx-border-focus);
    box-shadow: 0 0 0 3px rgba(29, 111, 184, 0.15);
}
.lgbx-input[readonly] {
    background: var(--lgbx-bg-alt);
    color: var(--lgbx-muted);
    cursor: default;
}
select.lgbx-input {
    appearance: auto;
}

/* ═══════════════════════════════════════════════════
   Sidebar: price card + summary
   ═══════════════════════════════════════════════════ */

.lgbx-wizard__price-card {
    display: flex;
    flex-direction: column;
    background-color: #0071e3;
    background-image:
        linear-gradient(rgba(255,255,255,0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.06) 1px, transparent 1px);
    background-size: 28px 28px;
    color: #fff;
    border-radius: var(--lgbx-radius);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--lgbx-shadow-md);
    overflow: hidden;
}

/* ── Quick summary card ── */
.lgbx-quick-summary {
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 1rem;
    box-shadow: var(--lgbx-shadow);
}
.lgbx-quick-summary__header {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: #6e6e73;
    text-transform: uppercase;
    margin-bottom: 10px;
}
.lgbx-quick-summary__row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 4px 0;
    font-size: 0.875rem;
}
.lgbx-quick-summary__label {
    color: #6e6e73;
}
.lgbx-quick-summary__value {
    color: #1d1d1f;
    font-weight: 500;
    text-align: right;
}
.lgbx-quick-summary__value--green {
    color: #16a34a;
    font-weight: 500;
}
.lgbx-quick-summary__row--total {
    border-top: 1px solid #e5e5ea;
    margin-top: 6px;
    padding-top: 10px;
}
.lgbx-quick-summary__row--total .lgbx-quick-summary__label,
.lgbx-quick-summary__row--total .lgbx-quick-summary__value {
    font-weight: 700;
    color: #1d1d1f;
    font-size: 0.9375rem;
}
.lgbx-quick-summary__address {
    display: block;
    font-size: 0.75rem;
    color: #6e6e73;
    font-weight: 400;
    margin-top: 1px;
}
.lgbx-wizard__price-label {
    font-size: 0.8rem;
    font-weight: 500;
    opacity: 0.85;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.15rem;
}
.lgbx-wizard__price-value {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.1;
}
.lgbx-wizard__price-unit {
    font-size: 0.8rem;
    opacity: 0.75;
    margin-top: 0.2rem;
}

.lgbx-wizard__sidebar .lgbx-summary-table,
.lgbx-summary-table--inline {
    background: var(--lgbx-bg);
    border: 1px solid var(--lgbx-border);
    border-radius: var(--lgbx-radius);
    overflow: hidden;
    box-shadow: var(--lgbx-shadow);
}

/* ═══════════════════════════════════════════════════
   Summary table
   ═══════════════════════════════════════════════════ */

.lgbx-summary-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}
.lgbx-summary-table th,
.lgbx-summary-table td {
    padding: 0.55rem 0.875rem;
    border-bottom: 1px solid var(--lgbx-border);
    text-align: left;
    vertical-align: top;
}
.lgbx-summary-table thead th {
    border-bottom: 2px solid var(--lgbx-border);
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--lgbx-muted);
    background: var(--lgbx-bg-alt);
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}
.lgbx-summary-table td small {
    display: block;
    color: var(--lgbx-muted);
    font-size: 0.82em;
    margin-top: 0.1rem;
}
.lgbx-summary-price-col {
    text-align: right !important;
    white-space: nowrap;
    vertical-align: top;
    font-variant-numeric: tabular-nums;
}
.lgbx-summary-discount td {
    color: var(--lgbx-success);
}
.lgbx-summary-separator td {
    font-weight: 600;
    background: var(--lgbx-bg-alt);
    font-size: 0.8rem;
    color: var(--lgbx-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding-top: 0.6rem;
    padding-bottom: 0.6rem;
}
.lgbx-summary-total td {
    font-size: 1em;
    font-weight: 700;
    border-bottom: none;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}
.lgbx-summary-return-total td {
    color: var(--lgbx-muted);
    font-style: italic;
    border-bottom: none;
}

/* ═══════════════════════════════════════════════════
   Toggle switch
   ═══════════════════════════════════════════════════ */

.lgbx-toggle {
    display: inline-flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    margin-bottom: 0.875rem;
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--lgbx-border);
    border-radius: var(--lgbx-radius-sm);
    background: var(--lgbx-bg-alt);
    transition: border-color var(--lgbx-t), background var(--lgbx-t);
    width: 100%;
    box-sizing: border-box;
}
.lgbx-toggle:has(input:checked) {
    border-color: var(--lgbx-primary);
    background: rgba(29, 111, 184, 0.04);
}
.lgbx-toggle input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.lgbx-toggle__switch {
    position: relative;
    flex-shrink: 0;
    width: 44px;
    height: 24px;
    background: #cbd5e0;
    border-radius: 12px;
    transition: background var(--lgbx-t);
    margin-top: 1px;
}
.lgbx-toggle__switch::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    transition: transform var(--lgbx-t);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
.lgbx-toggle input:checked + .lgbx-toggle__switch {
    background: var(--lgbx-primary);
}
.lgbx-toggle input:checked + .lgbx-toggle__switch::after {
    transform: translateX(20px);
}
.lgbx-toggle input:focus-visible + .lgbx-toggle__switch {
    outline: 2px solid var(--lgbx-primary);
    outline-offset: 2px;
}
.lgbx-toggle__label {
    font-weight: 500;
    font-size: 0.9375rem;
    line-height: 1.4;
    flex: 1;
}
.lgbx-toggle__label small {
    display: block;
    font-weight: 400;
    color: var(--lgbx-muted);
    font-size: 0.84em;
    margin-top: 0.15em;
}

/* ═══════════════════════════════════════════════════
   Postal status indicator
   ═══════════════════════════════════════════════════ */

.lgbx-wizard__postal-status {
    display: inline;
    font-size: 0.82em;
    font-weight: 600;
    margin-left: auto;
    padding-left: 0.5rem;
}
/* Postal label as flex row so status text sits right of label */
label[for="lgbx_postal_delivery"],
label[for="lgbx_postal_return"] {
    display: flex !important;
    align-items: center;
    gap: 8px;
}
.lgbx-wizard__postal-status.is-ok {
    color: var(--lgbx-success);
}
.lgbx-wizard__postal-status.is-error {
    color: var(--lgbx-danger);
}

/* ═══════════════════════════════════════════════════
   Info boxes
   ═══════════════════════════════════════════════════ */

.lgbx-wizard__info-box {
    background: #f5f5f7;
    border: none;
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 0.9em;
    color: #1d1d1f;
    margin: 0.5rem 0;
}

/* ═══════════════════════════════════════════════════
   Error message
   ═══════════════════════════════════════════════════ */

.lgbx-wizard__error {
    background: #fef2f2;
    color: #9b1c1c;
    border: 1px solid #fca5a5;
    padding: 0.875rem 1rem;
    margin-top: 1rem;
    border-radius: var(--lgbx-radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
}

/* ═══════════════════════════════════════════════════
   Buttons
   ═══════════════════════════════════════════════════ */

.lgbx-button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 700;
    border: none;
    border-radius: var(--lgbx-radius-sm);
    cursor: pointer;
    transition: background var(--lgbx-t), opacity var(--lgbx-t), transform 80ms ease, box-shadow var(--lgbx-t);
    letter-spacing: 0.01em;
}
.lgbx-button:active {
    transform: translateY(1px);
}
.lgbx-button--primary {
    background: #0071e3;
    color: #fff;
    border-radius: 980px;
    box-shadow: none;
}
.lgbx-button--primary:hover {
    background: #0064cc;
    box-shadow: none;
}

/* ═══════════════════════════════════════════════════
   Navigation / submit
   ═══════════════════════════════════════════════════ */

.lgbx-wizard__nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.25rem;
    gap: 1rem;
}
.lgbx-wizard__nav--submit {
    margin-top: 1rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
}
.lgbx-wizard__nav--submit .lgbx-button {
    width: 100%;
    padding: 0.875rem 1.5rem;
    font-size: 1.05rem;
    border-radius: var(--lgbx-radius-sm);
}
.lgbx-no-payment-note {
    text-align: center;
    font-size: 0.8rem;
    color: #6e6e73;
    margin: 0.4rem 0 0;
}
#lgbx_btn_submit:disabled {
    opacity: 0.6;
    cursor: wait;
    box-shadow: none;
}

/* ═══════════════════════════════════════════════════
   Debug breakdown
   ═══════════════════════════════════════════════════ */

.lgbx-wizard__debug {
    margin-top: 1rem;
    border: 1px solid var(--lgbx-border);
    border-radius: var(--lgbx-radius-sm);
    overflow: hidden;
}
.lgbx-wizard__debug summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 0.8rem;
    padding: 0.5rem 0.75rem;
    background: var(--lgbx-bg-alt);
    color: var(--lgbx-muted);
}
.lgbx-debug-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.78rem;
    font-family: ui-monospace, "Cascadia Code", monospace;
    padding: 0.5rem;
}
.lgbx-debug-table td {
    padding: 0.2rem 0.6rem;
    border-bottom: 1px solid var(--lgbx-border);
}
.lgbx-debug-table td:first-child {
    color: var(--lgbx-muted);
}
.lgbx-debug-table td:last-child {
    text-align: right;
}

/* ═══════════════════════════════════════════════════
   Loading overlay
   ═══════════════════════════════════════════════════ */

.lgbx-wizard__loading {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.88);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    z-index: 100;
    font-weight: 600;
    color: var(--lgbx-text);
    backdrop-filter: blur(2px);
    border-radius: var(--lgbx-radius);
}
.lgbx-wizard__spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--lgbx-border);
    border-top-color: var(--lgbx-primary);
    border-radius: 50%;
    animation: lgbx-spin 0.65s linear infinite;
}
@keyframes lgbx-spin {
    to { transform: rotate(360deg); }
}

/* ═══════════════════════════════════════════════════
   Delivery date multi-box fields
   ═══════════════════════════════════════════════════ */

#lgbx_separate_dates_toggle_row {
    margin-bottom: 1rem;
}
#lgbx_delivery_dates_multi .lgbx-field-row {
    margin-bottom: 0.5rem;
}
#lgbx_delivery_dates_multi label {
    font-weight: 500;
    font-size: 0.875em;
}

/* ═══════════════════════════════════════════════════
   Savings box
   ═══════════════════════════════════════════════════ */

#lgbx_savings_box {
    margin-top: 0.75rem;
    padding: 0.75rem 1rem;
    background: rgba(13, 159, 110, 0.07);
    border: 1px solid rgba(13, 159, 110, 0.2);
    border-radius: var(--lgbx-radius-sm);
    font-size: 0.875rem;
    color: #065f46;
    font-weight: 500;
}

/* ═══════════════════════════════════════════════════
   Progress bar
   ═══════════════════════════════════════════════════ */

.lgbx-progress-bar {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.75rem;
    padding: 0 0.25rem;
    user-select: none;
}

.lgbx-progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.lgbx-progress-step__circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #d2d2d7;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: #aeaeb2;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
    position: relative;
}

.lgbx-progress-step__num {
    display: block;
    line-height: 1;
}

.lgbx-progress-step__check {
    display: none;
}

.lgbx-progress-step__label {
    font-size: 0.8rem;
    font-weight: 500;
    color: #aeaeb2;
    white-space: nowrap;
    transition: color 0.2s;
}

/* Connector line between steps */
.lgbx-progress-connector {
    flex: 1;
    height: 2px;
    background: #d2d2d7;
    margin: 15px 6px 0; /* 15px top = center of 32px circle */
    border-radius: 1px;
    transition: background 0.2s;
}
.lgbx-progress-connector.is-done {
    background: #0d9f6e;
}

/* Active step */
.lgbx-progress-step.is-active .lgbx-progress-step__circle {
    border-color: #0071e3;
    background: #0071e3;
    color: #fff;
}
.lgbx-progress-step.is-active .lgbx-progress-step__label {
    color: #0071e3;
    font-weight: 600;
}

/* Done step */
.lgbx-progress-step.is-done .lgbx-progress-step__circle {
    border-color: #0d9f6e;
    background: #0d9f6e;
    color: #fff;
}
.lgbx-progress-step.is-done .lgbx-progress-step__num {
    display: none;
}
.lgbx-progress-step.is-done .lgbx-progress-step__check {
    display: block;
}
.lgbx-progress-step.is-done .lgbx-progress-step__label {
    color: #6e6e73;
}

/* Responsive: hide labels on mobile */
@media (max-width: 480px) {
    .lgbx-progress-step__label {
        font-size: 0.7rem;
    }
    .lgbx-progress-step__circle {
        width: 28px;
        height: 28px;
        font-size: 0.78rem;
    }
    .lgbx-progress-connector {
        margin-top: 13px; /* center of 28px circle */
    }
}

@media (max-width: 768px) {
    .lgbx-wizard__sidebar {
        order: 1;
    }
    .lgbx-wizard__price-card {
        display: none;
    }
}

/* ═══════════════════════════════════════════════════
   Responsive — tablet (≤900px)
   ═══════════════════════════════════════════════════ */

@media (max-width: 900px) {
    .lgbx-wizard__columns {
        flex-direction: column;
    }
    .lgbx-wizard__sidebar {
        flex: none;
        max-width: none;
        width: 100%;
        position: static;
        order: 2;
    }
    .lgbx-wizard__main {
        order: 1;
    }
}

/* ═══════════════════════════════════════════════════
   Responsive — mobile (≤640px)
   ═══════════════════════════════════════════════════ */

@media (max-width: 640px) {
    /* Full-bleed: fjern padding på wizard og reset wp-block-columns-stiler */
    .lgbx-wizard {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    /* wp-block-columns og wp-block-column kan få egne WP/tema-stiler — reset dem */
    .lgbx-wizard__columns,
    .lgbx-wizard .wp-block-columns {
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        box-sizing: border-box;
        width: 100% !important;
        max-width: 100% !important;
    }

    .lgbx-wizard__main,
    .lgbx-wizard .wp-block-column {
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        box-sizing: border-box;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0;
    }

    /* Step-kortene får litt luft inni seg */
    .lgbx-wizard__step {
        padding: 1.1rem 0.875rem;
        margin-left: 0.75rem;
        margin-right: 0.75rem;
    }

    /* Dept selector: wrap pills on narrow screens */
    .lgbx-dept-selector {
        flex-wrap: wrap;
    }


    /* Toggle buttons: full width */
    .lgbx-wizard .wp-block-buttons {
        width: 100%;
        flex-wrap: wrap;
    }
    .lgbx-wizard .wp-block-button {
        flex: 1;
        text-align: center;
        min-width: 40px;
    }
    .lgbx-wizard .wp-block-button .wp-block-button__link {
        padding: 0.55rem 0.6rem;
        font-size: 0.875rem;
    }

    /* Option cards: stack vertically */
    .lgbx-wizard__options--horizontal {
        flex-direction: column;
        flex-wrap: wrap;
        overflow-x: visible;
    }
    .lgbx-wizard__option {
        min-width: 0;
        flex: none;
        width: 100%;
    }

    /* Price card */
    .lgbx-wizard__price-value {
        font-size: 1.6rem;
    }

    /* Field row: single column */
    .lgbx-field-row {
        grid-template-columns: 1fr;
    }

    /* Box info image: smaller */
    .lgbx-box-info__image {
        width: 260px;
    }

    .lgbx-wizard__section-header-row h3 {
        font-size: 1rem;
    }

    /* Toggle: compact */
    .lgbx-toggle {
        padding: 0.65rem 0.75rem;
    }
}

/* ── Hide radio button circles (visual only) ── */
.lgbx-dept-pill::before,
.lgbx-agree-card__radio,
.lgbx-carry-card__radio {
    display: none;
}
