/* ========== LOF Compact Overlay v3 — custom modal form ========== */
body.lof-compact-on {
    --lof-bg: #0a0a0b;
    --lof-surface: #111114;
    --lof-surface-2: #17171c;
    --lof-surface-3: #1e1e24;
    --lof-border: #26262e;
    --lof-border-hi: #3a3a44;
    --lof-text: #f4f4f6;
    --lof-text-dim: #9ca3af;
    --lof-text-mute: #6b7280;
    --lof-accent: #10b981;
    --lof-accent-hover: #0fa674;
    --lof-brand: #3b82f6;
    --lof-radius-lg: 16px;
    --lof-radius: 10px;
    --lof-radius-sm: 6px;
    --lof-shadow: 0 24px 64px rgba(0,0,0,0.55), 0 8px 16px rgba(0,0,0,0.35);
}
/* Hide ONLY Lagom's original form content — keep page header, footer, top nav */
body.lof-compact-on .main-grid,
body.lof-compact-on .main-header-title,
body.lof-compact-on .app-nav-menu,
body.lof-compact-on #main-menu,
body.lof-compact-on #one-page-order-init-loader,
body.lof-compact-on .vue-app-main-container > *:not(.lof-overlay):not(.main-body) {
    display: none !important;
}
/* main-body still renders (to host our overlay) but its internal grid is hidden */
body.lof-compact-on .main-body > .container,
body.lof-compact-on .main-body > .main-grid {
    display: none !important;
}
body.lof-compact-on .lof-overlay {
    display: block !important;
}
/* No modal card — let the page flow. Keep Lagom's wrapper as-is. */
body.lof-compact-on .app-main,
body.lof-compact-on .app-main-order {
    background: transparent !important;
}
body.lof-compact-on .main-body {
    padding: 0 !important;
    background: transparent !important;
    min-height: 0 !important;
}
/* Overlay matches Lagom's .container boundaries exactly
   (max-width 1360px, padding 0 40px) so left/right edges align
   with the header logo and login button. */
body.lof-compact-on .lof-overlay {
    max-width: 1360px !important;
    width: 100% !important;
    margin: 12px auto 20px auto !important;
    padding: 0 40px !important;
    box-sizing: border-box !important;
}
.lof-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 0 14px 0;
    margin-bottom: 4px;
    gap: 16px;
    flex-wrap: wrap;
    border-bottom: 0;
    background: transparent;
}
.lof-card-head h1 {
    margin: 0 !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    color: var(--lof-text) !important;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 10px;
}
.lof-card-head h1::before {
    content: '';
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--lof-accent);
    box-shadow: 0 0 0 4px rgba(16,185,129,0.14);
}
.lof-card-head .lof-secure {
    display: flex;
    gap: 16px;
    font-size: 11px;
    color: var(--lof-text-dim);
}
/* Option glyph — flag/icon prefix on config-row button label and dropdown options */
.lof-option-glyph {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    margin-right: 8px;
    font-size: 14px;
    line-height: 1;
    flex-shrink: 0;
}
.lof-option-glyph-svg svg { display: block; }
.lof-select-btn .lof-option-glyph { margin-right: 6px; }
.lof-option .lof-option-glyph { margin-right: 8px; }
/* Wrap glyph+label so they hug each other on the right side of the button */
.lof-select-label-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    gap: 6px;
}
/* Inside the wrap, the label must NOT stretch — otherwise it pushes the glyph away */
.lof-select-label-wrap > .lof-select-label { flex: 0 0 auto; }
/* Glyph sits flush against the label; no extra right margin inside the wrap */
.lof-select-label-wrap > .lof-option-glyph { margin-right: 0; }

/* Section-label row that hosts the currency switcher beside the label text */
.lof-section-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.lof-currency-switcher:empty { display: none; }
.lof-currency-switcher.pills {
    display: inline-flex;
    padding: 3px;
    background: var(--lof-bg, rgba(255,255,255,0.04));
    border: 1px solid var(--lof-border);
    border-radius: 999px;
    gap: 2px;
}
.lof-currency-pill {
    appearance: none;
    background: transparent;
    border: 0;
    color: var(--lof-text-dim);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 5px 11px;
    border-radius: 999px;
    cursor: pointer;
    transition: background 120ms ease, color 120ms ease;
    line-height: 1;
}
.lof-currency-pill:hover { color: var(--lof-text); }
.lof-currency-pill.active {
    background: var(--lof-accent);
    color: #fff;
    cursor: default;
}
.lof-currency-switcher.dropdown .lof-select-btn {
    padding: 5px 11px;
    font-size: 11px;
    font-weight: 600;
    min-width: 70px;
}
.lof-card-head .lof-secure span::before {
    content: '✓ ';
    color: var(--lof-accent);
    font-weight: 700;
}
.lof-overlay { display: none; }
.lof-body {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    gap: 0;
    background: var(--lof-surface);
    border: 1px solid var(--lof-border);
    border-radius: var(--lof-radius-lg);
    padding: 0;
    overflow: hidden;
}
.lof-col {
    padding: 18px 22px;
    min-width: 0;
}
.lof-col-left {
    border-right: 1px solid var(--lof-border);
}
.lof-col-right {
    background: var(--lof-surface-2);
}
.lof-section + .lof-section {
    margin-top: 12px;
}
.lof-section-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--lof-text-mute);
    margin: 0 0 6px 0;
}
.lof-group-tabs {
    display: flex;
    gap: 8px;
    padding: 6px;
    background: var(--lof-surface-3);
    border-radius: var(--lof-radius);
    overflow-x: auto;
}
.lof-group-tab {
    flex: 1 0 auto;
    padding: 10px 14px;
    border: 0;
    background: transparent;
    color: var(--lof-text-dim);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border-radius: var(--lof-radius-sm);
    white-space: nowrap;
    font-family: inherit;
}
.lof-group-tab:hover { color: var(--lof-text); }
.lof-group-tab.active {
    background: var(--lof-surface);
    color: var(--lof-text);
    box-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
.lof-tier-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
}
.lof-tier {
    border: 1px solid var(--lof-border);
    background: var(--lof-surface-2);
    border-radius: var(--lof-radius);
    padding: 10px 12px;
    text-align: left;
    cursor: pointer;
    position: relative;
    color: var(--lof-text);
    font-family: inherit;
    transition: border 0.15s;
    min-width: 0;
}
.lof-tier:hover { border-color: var(--lof-border-hi); }
.lof-tier.active {
    border-color: var(--lof-accent);
    background: rgba(16,185,129,0.06);
}
.lof-tier.active::after {
    content: '✓';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 18px;
    height: 18px;
    background: var(--lof-accent);
    color: #042f24;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 900;
    line-height: 18px;
    text-align: center;
    display: inline-block;
    font-family: -apple-system, 'SF Pro Text', system-ui, sans-serif;
}
.lof-tier-name {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 2px;
}
.lof-tier-specs {
    font-size: 10px;
    color: var(--lof-text-dim);
    line-height: 1.4;
}
.lof-tier-price {
    font-size: 13px;
    font-weight: 700;
    margin-top: 6px;
    color: var(--lof-text);
}
.lof-config-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 12px;
    background: var(--lof-surface-2);
    border: 1px solid var(--lof-border);
    border-radius: var(--lof-radius);
    gap: 12px;
    min-height: 36px;
}
.lof-config-row + .lof-config-row { margin-top: 6px; }
.lof-config-row > .lof-label {
    font-size: 12px;
    color: var(--lof-text-dim);
    margin: 0;
    white-space: nowrap;
}
.lof-config-row .lof-select {
    flex: 1;
    min-width: 0;
    max-width: 240px;
}
.lof-config-row .lof-select-btn {
    background: transparent;
    border: 0;
    padding: 4px 0 4px 4px;
    font-weight: 500;
}

/* ========= Custom select (dark theme dropdown) ========= */
.lof-select {
    position: relative;
    font-family: inherit;
    width: 100%;
}
.lof-select-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    height: 36px;
    padding: 0 10px;
    background: var(--lof-surface-3);
    border: 1px solid var(--lof-border);
    color: var(--lof-text);
    font-size: 12px;
    border-radius: var(--lof-radius-sm);
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    box-sizing: border-box;
    min-width: 0;
}
.lof-config-row .lof-select-btn {
    height: 24px;
    padding: 0 4px 0 0;
    background: transparent;
    border: 0;
}
.lof-select-btn:hover {
    border-color: var(--lof-border-hi);
}
.lof-select.open .lof-select-btn {
    border-color: var(--lof-accent);
    background: var(--lof-surface);
}
.lof-select-label {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.lof-select-label.empty { color: var(--lof-text-mute); }
.lof-select-arrow {
    font-size: 11px;
    color: var(--lof-text-dim);
    transition: transform 0.15s;
}
.lof-select.open .lof-select-arrow {
    transform: rotate(180deg);
}
.lof-select-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    max-height: 320px;
    background: var(--lof-surface);
    border: 1px solid var(--lof-border-hi);
    border-radius: var(--lof-radius-sm);
    z-index: 100;
    box-shadow: 0 12px 32px rgba(0,0,0,0.5);
    display: none;
    flex-direction: column;
    overflow: hidden;
}
.lof-select.open .lof-select-menu { display: flex; }
.lof-select-search {
    width: 100% !important;
    height: 38px !important;
    padding: 0 12px !important;
    background: var(--lof-surface-3) !important;
    border: 0 !important;
    border-bottom: 1px solid var(--lof-border) !important;
    color: var(--lof-text) !important;
    font-size: 12px !important;
    line-height: normal !important;
    box-sizing: border-box !important;
    border-radius: 0 !important;
    margin: 0 !important;
    outline: 0 !important;
}
.lof-select-search:focus {
    outline: 0 !important;
    border-color: var(--lof-border) !important;
    border-bottom-color: var(--lof-accent) !important;
}
.lof-select-list {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 4px;
    margin: 0;
    max-height: 280px;
    background: transparent;
    display: block;
}
.lof-option {
    display: block;
    padding: 8px 10px;
    font-size: 12px;
    color: var(--lof-text);
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: transparent;
    border: 0;
    margin: 0;
}
.lof-option:hover { background: var(--lof-surface-3); }
.lof-option.selected {
    background: rgba(16,185,129,0.12);
    color: var(--lof-accent);
    font-weight: 500;
}
body.lof-compact-on .lof-option.hidden-by-search { display: none !important; }
.lof-select-list li:hover {
    background: var(--lof-surface-3);
}
.lof-select-list li.selected {
    background: rgba(16,185,129,0.12);
    color: var(--lof-accent);
    font-weight: 500;
}
.lof-select-list li.hidden-by-search {
    display: none !important;
}
.lof-select-empty {
    padding: 16px 12px;
    font-size: 12px;
    color: var(--lof-text-mute);
    text-align: center;
}
/* Config-row dropdowns: full-width of wrapper so there's no gap on the left */
.lof-config-row .lof-select-menu {
    left: 0 !important;
    right: 0 !important;
    min-width: 220px !important;
}
.lof-config-row .lof-select-label { text-align: right; }
.lof-cycle-toggle {
    display: flex;
    background: var(--lof-surface-3);
    border-radius: var(--lof-radius);
    padding: 3px;
}
.lof-cycle-btn {
    flex: 1;
    padding: 7px 10px;
    border: 0;
    background: transparent;
    color: var(--lof-text-dim);
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    border-radius: var(--lof-radius-sm);
    font-family: inherit;
}
.lof-cycle-btn.active {
    background: var(--lof-surface);
    color: var(--lof-text);
    box-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
.lof-cycle-btn small {
    display: inline-block;
    margin-left: 4px;
    padding: 2px 5px;
    background: var(--lof-accent);
    color: #042f24;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 700;
}
.lof-summary {
    padding: 10px 12px;
    background: var(--lof-surface-2);
    border: 1px solid var(--lof-border);
    border-radius: var(--lof-radius);
}
.lof-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 12px;
    color: var(--lof-text-dim);
}
.lof-summary-product {
    font-weight: 600;
    font-size: 13px;
    color: var(--lof-text);
    padding-bottom: 6px;
}
.lof-summary-detail {
    font-size: 11px;
    color: var(--lof-text-mute);
}
.lof-summary-divider {
    border-top: 1px dashed var(--lof-border);
    margin: 8px 0 4px;
}
.lof-summary-row.total {
    margin-top: 4px;
    padding-top: 8px;
    font-size: 14px;
    color: var(--lof-text);
    font-weight: 700;
}
.lof-promo {
    display: flex;
    gap: 6px;
    margin: 10px -12px 0;
    padding: 10px 12px 0;
    border-top: 1px dashed var(--lof-border-hi);
}
.lof-promo input {
    flex: 1;
    height: 32px !important;
    padding: 0 10px !important;
    background: var(--lof-surface-3) !important;
    border: 1px solid var(--lof-border) !important;
    color: var(--lof-text) !important;
    border-radius: var(--lof-radius-sm) !important;
    font-size: 11px !important;
    box-sizing: border-box !important;
    line-height: 30px !important;
    min-width: 0 !important;
}
.lof-promo button {
    height: 32px;
    padding: 0 12px;
    background: var(--lof-surface-3);
    border: 1px solid var(--lof-border-hi);
    color: var(--lof-text);
    border-radius: var(--lof-radius-sm);
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
}
.lof-promo button:hover { background: var(--lof-surface); }
.lof-promo-status {
    margin-top: 6px;
    font-size: 10px;
    color: var(--lof-accent);
}
.lof-promo-status.error { color: #ef4444; }
.lof-field {
    margin-bottom: 8px;
}
.lof-field label {
    display: block;
    font-size: 10px;
    color: var(--lof-text-dim);
    margin-bottom: 3px;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
}
.lof-field input,
.lof-field select,
body.lof-compact-on .lof-overlay .lof-field input,
body.lof-compact-on .lof-overlay .lof-field select {
    display: block !important;
    width: 100% !important;
    height: 36px !important;
    padding: 0 10px !important;
    background: var(--lof-surface-3) !important;
    border: 1px solid var(--lof-border) !important;
    color: var(--lof-text) !important;
    border-radius: var(--lof-radius-sm) !important;
    font-size: 12px !important;
    box-sizing: border-box !important;
    font-family: inherit !important;
    line-height: 34px !important;
    margin: 0 !important;
    min-width: 0 !important;
    max-width: 100% !important;
}
.lof-field input:focus,
.lof-field select:focus {
    outline: 0;
    border-color: var(--lof-accent);
    background: var(--lof-surface);
}
.lof-field.row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px;
    margin-bottom: 8px;
    align-items: start;
}
.lof-field.row > div {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.lof-field label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* Password strength meter + confirm match indicator */
.lof-pw-meter {
    margin-top: 4px;
    font-size: 10px;
    color: var(--lof-text-mute);
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 14px;
}
.lof-pw-meter::before {
    content: '';
    flex: 1;
    height: 3px;
    background: var(--lof-border);
    border-radius: 2px;
}
.lof-pw-meter.weak::before { background: linear-gradient(to right, #ef4444 25%, var(--lof-border) 25%); }
.lof-pw-meter.medium::before { background: linear-gradient(to right, #f59e0b 50%, var(--lof-border) 50%); }
.lof-pw-meter.good::before { background: linear-gradient(to right, #10b981 75%, var(--lof-border) 75%); }
.lof-pw-meter.strong::before { background: var(--lof-accent); }
.lof-pw-meter.weak { color: #ef4444; }
.lof-pw-meter.medium { color: #f59e0b; }
.lof-pw-meter.good, .lof-pw-meter.strong { color: var(--lof-accent); }

.lof-pw-match {
    margin-top: 4px;
    font-size: 10px;
    color: var(--lof-text-mute);
    min-height: 14px;
}
.lof-pw-match.match { color: var(--lof-accent); }
.lof-pw-match.mismatch { color: #ef4444; }
.lof-pw-disclosure:hover {
    border-color: var(--lof-border-hi);
    color: var(--lof-text);
}
/* Payment slot hosts Lagom's relocated .payment-section */
.lof-payment-slot { min-height: 40px; }

/* Phone slot hosts Lagom's relocated phone widget */
.lof-phone-slot { display: block; width: 100%; }
body.lof-compact-on .lof-overlay .lof-phone-slot .form-group {
    margin: 0 !important;
}
/* Hide Lagom's duplicate label — we already have our own "Phone" label */
body.lof-compact-on .lof-overlay .lof-phone-slot .form-group > label,
body.lof-compact-on .lof-overlay .lof-phone-slot .control-label {
    display: none !important;
}
body.lof-compact-on .lof-overlay .lof-phone-slot .intl-tel-input {
    width: 100% !important;
    position: relative !important;
}
body.lof-compact-on .lof-overlay .lof-phone-slot .flag-container {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    right: auto !important;
    height: 100% !important;
    width: 80px !important;
    max-width: 80px !important;
    padding: 0 !important;
    z-index: 2 !important;
}
body.lof-compact-on .lof-overlay .lof-phone-slot .selected-flag {
    width: 100% !important;
    max-width: 80px !important;
    padding: 0 6px 0 10px !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    box-sizing: border-box !important;
}
body.lof-compact-on .lof-overlay .lof-phone-slot input[type="tel"],
body.lof-compact-on .lof-overlay .lof-phone-slot input[name="phonenumber"],
body.lof-compact-on .lof-overlay .lof-phone-slot input.form-control {
    width: 100% !important;
    height: 36px !important;
    padding: 0 10px 0 78px !important;
    background: var(--lof-surface-3) !important;
    border: 1px solid var(--lof-border) !important;
    color: var(--lof-text) !important;
    border-radius: var(--lof-radius-sm) !important;
    font-size: 12px !important;
    box-sizing: border-box !important;
    line-height: 34px !important;
}
body.lof-compact-on .lof-overlay .lof-phone-slot .iti__flag-container,
body.lof-compact-on .lof-overlay .lof-phone-slot .flag-container {
    background: transparent !important;
    border-right: 1px solid var(--lof-border) !important;
}
body.lof-compact-on .lof-overlay .lof-phone-slot .iti__selected-flag,
body.lof-compact-on .lof-overlay .lof-phone-slot .selected-flag {
    background: transparent !important;
    padding: 0 6px 0 10px !important;
}
body.lof-compact-on .lof-overlay .lof-phone-slot .iti__country-list,
body.lof-compact-on .lof-overlay .lof-phone-slot .country-list {
    background: var(--lof-surface) !important;
    border: 1px solid var(--lof-border-hi) !important;
    border-radius: var(--lof-radius-sm) !important;
    color: var(--lof-text) !important;
    box-shadow: 0 12px 32px rgba(0,0,0,0.5) !important;
    max-height: 280px !important;
}
body.lof-compact-on .lof-overlay .lof-phone-slot .iti__country,
body.lof-compact-on .lof-overlay .lof-phone-slot .country {
    color: var(--lof-text) !important;
    padding: 8px 10px !important;
    font-size: 12px !important;
}
body.lof-compact-on .lof-overlay .lof-phone-slot .iti__country:hover,
body.lof-compact-on .lof-overlay .lof-phone-slot .country:hover {
    background: var(--lof-surface-3) !important;
}
body.lof-compact-on .lof-overlay .lof-phone-slot .iti__country.iti__highlight,
body.lof-compact-on .lof-overlay .lof-phone-slot .country.highlight {
    background: rgba(16,185,129,0.12) !important;
}
body.lof-compact-on .lof-overlay .lof-phone-slot .iti__divider,
body.lof-compact-on .lof-overlay .lof-phone-slot .divider {
    border-color: var(--lof-border) !important;
}

body.lof-compact-on .lof-overlay .payment-section {
    background: transparent !important;
    border: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    display: block !important;
    width: 100% !important;
}
body.lof-compact-on .lof-overlay .payment-section .section-header { display: none !important; }
body.lof-compact-on .lof-overlay .payment-section .section-body { padding: 0 !important; }
body.lof-compact-on .lof-overlay .payment-section #payment-gateway-component,
body.lof-compact-on .lof-overlay .payment-section .panel-group {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    margin: 0 !important;
    background: transparent !important;
}
body.lof-compact-on .lof-overlay .payment-section .panel-check {
    background: var(--lof-surface-3) !important;
    border: 1px solid var(--lof-border) !important;
    border-radius: var(--lof-radius) !important;
    margin: 0 !important;
    box-shadow: none !important;
    display: block !important;
}
body.lof-compact-on .lof-overlay .payment-section .panel-check.gateway-checked {
    border-color: var(--lof-accent) !important;
    background: rgba(16,185,129,0.05) !important;
}
body.lof-compact-on .lof-overlay .payment-section .panel-heading {
    padding: 12px 14px 12px 38px !important;
    background: transparent !important;
    border: 0 !important;
    display: block !important;
    cursor: pointer !important;
    min-height: 44px !important;
    position: relative !important;
}
body.lof-compact-on .lof-overlay .payment-section .panel-heading > label,
body.lof-compact-on .lof-overlay .payment-section .panel-heading label {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 12px !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    min-height: 20px !important;
    cursor: pointer !important;
    white-space: normal !important;
    overflow: visible !important;
    font-weight: normal !important;
    position: static !important;
}
/* Radio absolutely positioned so it's vertically centered and
   independent of label flex layout */
body.lof-compact-on .lof-overlay .payment-section .radio-styled {
    width: 16px !important;
    height: 16px !important;
    border-radius: 50% !important;
    border: 2px solid var(--lof-border-hi) !important;
    background: transparent !important;
    position: absolute !important;
    left: 14px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
    box-sizing: border-box !important;
}
body.lof-compact-on .lof-overlay .payment-section .check-content {
    flex: 0 0 auto !important;
    min-width: 0 !important;
    display: flex !important;
    align-items: center !important;
    text-align: left !important;
    width: auto !important;
    margin-left: 0 !important;
    order: 1 !important;
}
body.lof-compact-on .lof-overlay .payment-section .check-content span {
    color: var(--lof-text) !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    flex: 0 0 auto !important;
    text-align: left !important;
}
body.lof-compact-on .lof-overlay .payment-section .check-icon,
body.lof-compact-on .lof-overlay .payment-section .panel-heading img {
    order: 2 !important;
    flex: 0 0 auto !important;
    max-height: 20px !important;
    opacity: 0.85 !important;
    margin-left: auto !important;
    position: static !important;
}
body.lof-compact-on .lof-overlay .payment-section .panel-check.gateway-checked .radio-styled {
    border-color: var(--lof-accent) !important;
}
body.lof-compact-on .lof-overlay .payment-section .panel-check.gateway-checked .radio-styled::after {
    content: '';
    position: absolute;
    inset: 2px;
    border-radius: 50%;
    background: var(--lof-accent);
}
body.lof-compact-on .lof-overlay .payment-section input[type="radio"] {
    position: absolute !important;
    opacity: 0 !important;
    pointer-events: none !important;
}
body.lof-compact-on .lof-overlay .payment-section .panel-body {
    padding: 0 14px 14px 14px !important;
    color: var(--lof-text-dim) !important;
    font-size: 12px !important;
    background: transparent !important;
}
body.lof-compact-on .lof-overlay .payment-section .panel-body input[type="text"],
body.lof-compact-on .lof-overlay .payment-section .panel-body input[type="number"],
body.lof-compact-on .lof-overlay .payment-section .panel-body input[type="tel"] {
    background: var(--lof-surface-2) !important;
    border: 1px solid var(--lof-border) !important;
    color: var(--lof-text) !important;
    border-radius: var(--lof-radius-sm) !important;
    padding: 10px 12px !important;
    font-size: 13px !important;
    width: 100% !important;
    height: 40px !important;
    box-sizing: border-box !important;
}
body.lof-compact-on .lof-overlay .payment-section .StripeElement {
    background: var(--lof-surface-2) !important;
    border: 1px solid var(--lof-border) !important;
    border-radius: var(--lof-radius-sm) !important;
    padding: 10px !important;
}
/* Saved card — layout, spacing, and Active badge styling */
body.lof-compact-on .lof-overlay .cc-item {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 10px 14px !important;
}
body.lof-compact-on .lof-overlay .cc-item-checkbox {
    flex: 0 0 auto !important;
    margin-bottom: 0 !important;
}
body.lof-compact-on .lof-overlay .cc-item-name {
    flex: 0 0 auto !important;
    font-weight: 600 !important;
}
body.lof-compact-on .lof-overlay .cc-item-desc {
    flex: 1 1 auto !important;
    color: var(--lof-text-dim) !important;
}
body.lof-compact-on .lof-overlay .cc-item-expiry {
    flex: 0 0 auto !important;
    color: var(--lof-text-mute) !important;
    font-size: 12px !important;
}
body.lof-compact-on .lof-overlay .cc-item-status .status-active {
    background: rgba(16, 185, 129, 0.15) !important;
    color: var(--lof-accent) !important;
    border: 1px solid rgba(16, 185, 129, 0.3) !important;
    border-radius: 999px !important;
    padding: 3px 10px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
}
/* Breathing room between Card Number and the Expiry+CVV row */
body.lof-compact-on .lof-overlay .payment-section .panel-body .StripeElement:not(:first-of-type) {
    margin-top: 12px !important;
}
body.lof-compact-on .lof-overlay .payment-section .panel-body label {
    margin-top: 10px !important;
}
body.lof-compact-on .lof-overlay .payment-section img {
    max-height: 20px !important;
    opacity: 0.8 !important;
}
.lof-tos {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding: 8px 10px;
    background: var(--lof-surface-3);
    border: 1px solid var(--lof-border);
    border-radius: var(--lof-radius-sm);
    font-size: 11px;
    color: var(--lof-text-dim);
    cursor: pointer;
}
.lof-tos input {
    accent-color: var(--lof-accent);
    width: 14px; height: 14px;
}
.lof-tos a { color: var(--lof-brand); }
.lof-pay-btn {
    display: flex;
    width: 100%;
    margin-top: 10px;
    padding: 12px 18px;
    background: var(--lof-accent);
    color: #042f24 !important;
    font-weight: 700;
    font-size: 14px;
    border: 0;
    border-radius: var(--lof-radius);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 0 0 0 rgba(16,185,129,0.4);
    transition: box-shadow 0.15s, background 0.15s;
    font-family: inherit;
}
.lof-pay-btn:hover {
    background: var(--lof-accent-hover);
    box-shadow: 0 0 0 4px rgba(16,185,129,0.15);
}
.lof-cancel-note {
    text-align: center;
    margin-top: 10px;
    font-size: 11px;
    color: var(--lof-text-mute);
}
@media (max-width: 860px) {
    body.lof-compact-on .app-main,
    body.lof-compact-on .app-main-order {
        margin: 12px 8px 40px 8px !important;
    }
    .lof-body { grid-template-columns: 1fr; }
    .lof-col-left { border-right: 0; border-bottom: 1px solid var(--lof-border); }
    .lof-col { padding: 20px; }
    .lof-field.row { grid-template-columns: 1fr; }
}

/* ---------- Phase 3 — Visibility toggles ---------- */
body.lof-hide-promo .lof-promo { display: none !important; }
body.lof-hide-badges .lof-card-head .lof-secure { display: none !important; }
body.lof-hide-cancel-note .lof-cancel-note { display: none !important; }
body.lof-hide-tier-specs .lof-tier-specs { display: none !important; }

/* ---------- Phase 4 — Layout choices ---------- */
body.lof-sidebar-left .lof-body > .lof-col-left {
    order: 2;
    border-right: 0;
    border-left: 1px solid var(--lof-border);
}
body.lof-sidebar-left .lof-body > .lof-col-right { order: 1; }

body.lof-ratio-product .lof-body { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
body.lof-ratio-balanced .lof-body { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
body.lof-ratio-checkout .lof-body { grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); }

@media (max-width: 860px) {
    body.lof-ratio-product .lof-body,
    body.lof-ratio-balanced .lof-body,
    body.lof-ratio-checkout .lof-body { grid-template-columns: 1fr; }
}

/* ---------- Smart prefill — recommendation badge ---------- */
body.lof-compact-on .lof-rec-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    margin-left: 8px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    border-radius: 999px;
    background: color-mix(in srgb, var(--lof-accent) 18%, transparent);
    color: var(--lof-accent);
    border: 1px solid color-mix(in srgb, var(--lof-accent) 35%, transparent);
    white-space: nowrap;
    flex: 0 0 auto;
}
body.lof-compact-on .lof-select-btn {
    display: flex;
    align-items: center;
    gap: 6px;
}
body.lof-compact-on .lof-select-btn .lof-select-arrow {
    margin-left: auto;
}
body.lof-compact-on .lof-option {
    display: flex !important;
    align-items: center;
    gap: 6px;
}
body.lof-compact-on .lof-option .lof-option-label {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
body.lof-compact-on .lof-option .lof-rec-badge {
    flex: 0 0 auto;
    margin-left: auto;
}

/* ---------- Embed mode: strip remaining WHMCS page chrome when iframed ---------- */
body.lof-embed {
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    min-height: 0 !important;
}
/* Hide WHMCS global page shell that compact-on leaves alone (header, footer, top-nav). */
body.lof-embed .main-header,
body.lof-embed .main-header-content,
body.lof-embed header.header,
body.lof-embed .header-slim,
body.lof-embed .header-wrapper,
body.lof-embed .top-nav,
body.lof-embed .topbar,
body.lof-embed .site-header,
body.lof-embed .app-nav-header,
body.lof-embed #header,
body.lof-embed .main-footer,
body.lof-embed footer.footer,
body.lof-embed .footer-wrapper,
body.lof-embed .site-footer,
body.lof-embed .cookie-consent,
body.lof-embed .announcement-bar {
    display: none !important;
}
/* Full-width overlay — the parent iframe already constrains the outer width. */
body.lof-embed.lof-compact-on .lof-overlay {
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 16px !important;
}
/* Kill any position:fixed so the iframe can size its scroll properly. */
body.lof-embed [style*="position: fixed"],
body.lof-embed [style*="position:fixed"] {
    position: static !important;
}

/* ---------- Hide cart/currency/language chrome in compact mode ---------- */
body.lof-compact-on .header-cart,
body.lof-compact-on .navbar-cart,
body.lof-compact-on [class*="cart-btn"],
body.lof-compact-on [class*="currency"]:not(.lof-currency-switcher):not(.lof-currency-pill),
body.lof-compact-on [class*="Currency"]:not(.lof-currency-switcher):not(.lof-currency-pill),
body.lof-compact-on [id*="currency"],
body.lof-compact-on [href*="cart.php"],
body.lof-compact-on a[href*="viewcart"],
body.lof-compact-on .store-cart,
body.lof-compact-on .header-slim__cart,
body.lof-compact-on .header-slim__currency,
body.lof-compact-on .top-bar-cart,
body.lof-compact-on .top-bar-currency,
body.lof-compact-on .top-menu-cart,
body.lof-compact-on .lang-selector,
body.lof-compact-on [class*="language-select"],
body.lof-compact-on [class*="lang-switch"],
body.lof-compact-on footer [class*="lang"],
body.lof-compact-on .footer-language,
body.lof-compact-on #langSelector,
body.lof-compact-on .lagom-language-selector { display: none !important; }

/* ---------- Phone — widen flag container for 3-digit codes like +381 ---------- */
body.lof-compact-on .flag-container,
body.lof-compact-on .iti__flag-container {
    width: 110px !important;
    max-width: 110px !important;
}
body.lof-compact-on .selected-flag,
body.lof-compact-on .iti__selected-flag {
    width: 110px !important;
    max-width: 110px !important;
    padding-right: 20px !important;
    position: relative !important;
}
body.lof-compact-on .iti__arrow,
body.lof-compact-on .selected-flag .arrow {
    position: absolute !important;
    right: 6px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
}
body.lof-compact-on .lof-overlay input[name="phonenumber"] {
    padding-left: 120px !important;
}
/* ---------- Phone country dropdown — absolute overlay, dark styling ---------- */
body.lof-compact-on .iti__country-list,
body.lof-compact-on .country-list {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    width: 360px !important;
    max-height: 280px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    background: var(--lof-surface) !important;
    border: 1px solid var(--lof-border) !important;
    border-radius: var(--lof-radius-sm) !important;
    z-index: 9999 !important;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4) !important;
}
body.lof-compact-on .iti,
body.lof-compact-on .intl-tel-input {
    position: relative !important;
}
body.lof-compact-on .iti__country,
body.lof-compact-on .country {
    padding: 8px 12px !important;
    color: var(--lof-text) !important;
    white-space: nowrap !important;
}
body.lof-compact-on .iti__country:hover,
body.lof-compact-on .iti__country.iti__highlight,
body.lof-compact-on .country:hover,
body.lof-compact-on .country.highlight {
    background: var(--lof-surface-2) !important;
}
body.lof-compact-on .iti__country-name,
body.lof-compact-on .country-name { color: var(--lof-text-dim) !important; }
body.lof-compact-on .iti__dial-code,
body.lof-compact-on .dial-code { color: var(--lof-text-mute) !important; }
body.lof-compact-on .lof-col-right { overflow: visible !important; }
body.lof-compact-on .lof-overlay { overflow-x: hidden !important; }
body.lof-compact-on .lof-body { overflow: visible !important; }
/* Phone search input injected by compact.js */
body.lof-compact-on .lof-phone-search {
    display: block;
    width: calc(100% - 16px);
    margin: 6px 8px;
    padding: 6px 10px;
    background: var(--lof-surface-2);
    border: 1px solid var(--lof-border);
    border-radius: var(--lof-radius-sm);
    color: var(--lof-text);
    font-size: 12px;
    outline: none;
    box-sizing: border-box;
}
body.lof-compact-on .lof-phone-search:focus {
    border-color: var(--lof-accent);
}

/* ---------- Address autocomplete suggestions ---------- */
body.lof-compact-on .lof-addr-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 999;
    background: var(--lof-surface);
    border: 1px solid var(--lof-border);
    border-radius: var(--lof-radius-sm);
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    max-height: 220px;
    overflow-y: auto;
}
body.lof-compact-on .lof-addr-suggestions:empty { display: none; }
body.lof-compact-on .lof-addr-item {
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 2px;
    border-bottom: 1px solid var(--lof-border);
}
body.lof-compact-on .lof-addr-item:last-child { border-bottom: none; }
body.lof-compact-on .lof-addr-item:hover {
    background: var(--lof-surface-2);
}
body.lof-compact-on .lof-addr-main {
    font-size: 12px;
    color: var(--lof-text);
    font-weight: 500;
}
body.lof-compact-on .lof-addr-sub {
    font-size: 10px;
    color: var(--lof-text-mute);
}

/* ---------- Optional field labels ---------- */
body.lof-compact-on .lof-optional {
    font-weight: 400;
    font-size: 10px;
    color: var(--lof-text-mute);
    opacity: 0.7;
}

/* ---------- "Are you a business?" toggle ---------- */
body.lof-compact-on .lof-business-toggle {
    float: right;
    font-size: 11px;
    font-weight: 500;
    color: var(--lof-accent);
    cursor: pointer;
    text-decoration: none;
    letter-spacing: 0;
    text-transform: none;
}
body.lof-compact-on .lof-business-toggle:hover { text-decoration: underline; }
body.lof-compact-on .lof-business-fields { display: none !important; }
body.lof-compact-on.lof-show-business .lof-business-fields { display: grid !important; }

/* ---------- Synthetic Tier (Platform-style selector) ---------- */
body.lof-compact-on .lof-synthetic-row {
    padding-bottom: 12px;
    margin-bottom: 4px;
    border-bottom: 1px dashed var(--lof-border);
}

/* ========== LOADING SKELETON ========== */
.lof-skeleton .lof-skeleton-inner {
    max-width: 700px;
    margin: 60px auto;
    padding: 40px;
}
.lof-sk-bar {
    height: 18px;
    margin-bottom: 16px;
    border-radius: 6px;
    background: var(--lof-surface-2);
    animation: lof-pulse 1.4s ease-in-out infinite;
}
.lof-sk-w40 { width: 40%; }
.lof-sk-w60 { width: 60%; }
.lof-sk-w80 { width: 80%; }
.lof-sk-row {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}
.lof-sk-card {
    flex: 1;
    height: 80px;
    border-radius: var(--lof-radius);
    background: var(--lof-surface-2);
    animation: lof-pulse 1.4s ease-in-out infinite;
}
@keyframes lof-pulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.8; }
}

/* ========== ERROR BANNER ========== */
body.lof-compact-on .lof-error-banner {
    background: rgba(220, 38, 38, 0.12);
    border: 1px solid rgba(220, 38, 38, 0.3);
    color: #fca5a5;
    padding: 10px 14px;
    border-radius: var(--lof-radius-sm);
    font-size: 12px;
    margin-bottom: 10px;
    line-height: 1.5;
}

/* ========== FIELD VALIDATION ERROR ========== */
body.lof-compact-on input.lof-field-error {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.2) !important;
}

/* ========== PAY BUTTON LOADING STATE ========== */
body.lof-compact-on .lof-pay-btn.lof-btn-loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}
body.lof-compact-on .lof-pay-btn.lof-btn-loading::after {
    content: '';
    position: absolute;
    right: 16px;
    top: 50%;
    width: 16px;
    height: 16px;
    margin-top: -8px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: lof-spin 0.6s linear infinite;
}
@keyframes lof-spin {
    to { transform: rotate(360deg); }
}

/* ========== TRUST SIGNAL ========== */
body.lof-compact-on .lof-trust-signal {
    text-align: center;
    font-size: 11px;
    color: var(--lof-text-mute);
    padding: 6px 0 2px;
    margin: 0;
    opacity: 0.7;
    line-height: 1.4;
}
body.lof-compact-on .lof-cancel-note {
    margin-top: 0 !important;
    padding-top: 2px !important;
}

/* ========== PROMO SUCCESS/ERROR ========== */
body.lof-compact-on .lof-promo-status.success {
    color: var(--lof-accent) !important;
}
body.lof-compact-on [data-lof="promo-apply"]:disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* ========== KEYBOARD NAVIGATION HIGHLIGHT ========== */
body.lof-compact-on .lof-option.lof-kb-highlight {
    background: var(--lof-surface-3) !important;
    outline: 1px solid var(--lof-accent);
}

/* ========== SMOOTH TRANSITIONS ========== */
body.lof-compact-on .lof-select-menu {
    transition: opacity 0.15s ease, transform 0.15s ease;
}
body.lof-compact-on .lof-tier {
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}
body.lof-compact-on .lof-tier:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
body.lof-compact-on .lof-cycle-btn {
    transition: background 0.15s ease, color 0.15s ease;
}
body.lof-compact-on .lof-pay-btn {
    transition: background 0.15s ease, opacity 0.15s ease, transform 0.1s ease;
}
body.lof-compact-on .lof-pay-btn:hover:not(.lof-btn-loading) {
    transform: translateY(-1px);
}
body.lof-compact-on .lof-pay-btn:active:not(.lof-btn-loading) {
    transform: translateY(0);
}

/* ========== MOBILE < 400px ========== */
@media (max-width: 400px) {
    body.lof-compact-on .lof-overlay {
        margin: 8px 4px 30px 4px !important;
    }
    body.lof-compact-on .lof-card-head h1 {
        font-size: 18px !important;
    }
    body.lof-compact-on .lof-card-head .lof-secure span {
        font-size: 10px !important;
    }
    body.lof-compact-on .lof-tier-grid {
        grid-template-columns: 1fr !important;
    }
    body.lof-compact-on .lof-col {
        padding: 14px !important;
    }
    body.lof-compact-on .lof-field.row {
        grid-template-columns: 1fr !important;
    }
    body.lof-compact-on .lof-section-label {
        font-size: 10px !important;
    }
    body.lof-compact-on label {
        font-size: 11px !important;
    }
    body.lof-compact-on input,
    body.lof-compact-on .lof-select-btn {
        font-size: 12px !important;
    }
}
