/**
 * WC 2FA - front-end styles (2.5.0)
 *
 * Loads on My Account, checkout, wp-login.php and pages with the 2FA shortcodes.
 * Sections: tokens; the login-form code field; the dashboard banner ([wc_2fa_banner]);
 * the six-box code field (login forms and the 2FA page); the 2FA page ([wc_2fa_settings]).
 *
 * 2.5.0 (2026-10-02): the 2FA page was redrawn in the My Account look (section "2FA PAGE" at
 * the end) and its old rules removed: the gradient header, status badges, grey/danger
 * buttons, the old codes box, the unused tooltip, and an "ADMIN STYLES" block that styled
 * classes the admin screen stopped using in 2.4.1 (it has its own wc-2fa-admin.css).
 *
 * Theme variables used: --main-color, --main-color-rgb, --soft-main(-dark|-light), --sec-color.
 */

/* =====================================================
   CSS CUSTOM PROPERTIES
   ===================================================== */
:root {
    --wc2fa-main: var(--main-color, #1a8fc4);
    --wc2fa-main-rgb: var(--main-color-rgb, 26, 143, 196);
    --wc2fa-soft: var(--soft-main, rgba(26, 143, 196, 0.25));
    --wc2fa-soft-dark: var(--soft-main-dark, rgba(26, 143, 196, 0.8));
    --wc2fa-soft-light: var(--soft-main-light, rgba(26, 143, 196, 0.08));
    --wc2fa-secondary: var(--sec-color, #373b3f);
    --wc2fa-text: #2d3748;
    --wc2fa-text-muted: #718096;
    --wc2fa-bg: #ffffff;
    --wc2fa-border: rgba(0, 0, 0, 0.06);
    --wc2fa-success: #48bb78;
    --wc2fa-danger: #f56565;
    --wc2fa-warning: #ed8936;
    --wc2fa-radius: 12px;
    --wc2fa-radius-btn: 50px;
    --wc2fa-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --wc2fa-shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.12);
    --wc2fa-transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =====================================================
   LOGIN FORM FIELD
   ===================================================== */
.wc-2fa-login-field {
    margin: 1rem 0;
    padding: 1rem;
    background: var(--wc2fa-soft-light);
    border-radius: var(--wc2fa-radius);
    border: 1px solid var(--wc2fa-border);
}

.wc-2fa-login-field label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--wc2fa-text);
    margin-bottom: 0.5rem;
}

.wc-2fa-login-field input[type='text'] {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--wc2fa-border);
    border-radius: var(--wc2fa-radius);
    font-size: 1rem;
}

.wc-2fa-login-field input[type='text']:focus {
    border-color: var(--wc2fa-main);
    box-shadow: 0 0 0 4px var(--wc2fa-soft-light);
    outline: none;
}

.wc-2fa-trust-device {
    margin-top: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--wc2fa-text-muted);
}

.wc-2fa-trust-device input[type='checkbox'] {
    width: 16px;
    height: 16px;
    accent-color: var(--wc2fa-main);
}

/* =====================================================
   2FA BANNER ([wc_2fa_banner], top of the My Account dashboard)
   2.4.2: redrawn in the site's current look. Light card with a soft glow, shield tile,
   title (+ "Recommended" tag when off), one line of why, pill button. Amber when 2FA is
   off, green when on. Selectors use a doubled class instead of !important: they must beat
   customstyle.css's old "enable-2fa" block (.wc-2fa-banner etc., single class, loaded later).
   ===================================================== */
.wc-2fa-banner.wc-2fa-banner {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 16px;
    box-sizing: border-box;
    width: 100%;
    margin: 0 0 20px;
    padding: 16px 18px;
    overflow: hidden;
    border: 1px solid #f1d9a8;
    border-radius: 18px;
    background:
        radial-gradient(90% 160% at 0% 0%, #fff1d4 0%, rgba(255, 241, 212, 0) 60%),
        linear-gradient(90deg, #fffaf0 0%, #ffffff 70%);
    box-shadow: 0 1px 2px rgba(15, 27, 42, 0.04), 0 18px 36px -30px rgba(180, 110, 20, 0.55);
    color: #0f1b2a;
    text-align: left;
}

.wc-2fa-banner.wc-2fa-banner * {
    box-sizing: border-box;
}

.wc-2fa-banner.wc-2fa-banner-enabled {
    border-color: #c6ead3;
    background:
        radial-gradient(90% 160% at 0% 0%, #dcf5e6 0%, rgba(220, 245, 230, 0) 60%),
        linear-gradient(90deg, #f3fbf6 0%, #ffffff 70%);
    box-shadow: 0 1px 2px rgba(15, 27, 42, 0.04), 0 18px 36px -30px rgba(22, 120, 70, 0.5);
}

/* Shield tile */
.wc-2fa-banner.wc-2fa-banner .wc-2fa-banner-icon {
    display: grid;
    place-items: center;
    flex: none;
    width: 48px;
    height: 48px;
    margin: 0;
    padding: 0;
    border-radius: 14px;
    background: linear-gradient(180deg, #fbbf24, #f59e0b);
    box-shadow: 0 0 0 4px #ffffff, 0 10px 20px -10px rgba(217, 119, 6, 0.85);
    color: #ffffff;
}

.wc-2fa-banner.wc-2fa-banner-enabled .wc-2fa-banner-icon {
    background: linear-gradient(180deg, #34d399, #16a34a);
    box-shadow: 0 0 0 4px #ffffff, 0 10px 20px -10px rgba(22, 163, 74, 0.85);
}

.wc-2fa-banner.wc-2fa-banner .wc-2fa-banner-icon svg {
    display: block;
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
}

/* Words */
.wc-2fa-banner.wc-2fa-banner .wc-2fa-banner-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 3px;
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    padding: 0;
}

.wc-2fa-banner.wc-2fa-banner .wc-2fa-banner-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    margin: 0;
    padding: 0;
    color: #0f1b2a;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.wc-2fa-banner.wc-2fa-banner .wc-2fa-banner-tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 9px;
    border: 1px solid #f3cf86;
    border-radius: 999px;
    background: #fff4dd;
    color: #a3510b;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.5;
}

.wc-2fa-banner.wc-2fa-banner .wc-2fa-banner-text {
    display: block;
    flex-grow: 0;
    margin: 0;
    padding: 0;
    color: #46556a;
    font-size: 14.5px;
    font-weight: 500;
    line-height: 1.45;
}

/* Button: blue pill (off), white ghost pill (on) */
.wc-2fa-banner.wc-2fa-banner a.wc-2fa-banner-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: none;
    height: 42px;
    margin: 0;
    padding: 0 20px;
    border: 0;
    border-radius: 50px;
    background: linear-gradient(180deg, #23a3dc, #1a8fc4);
    box-shadow: 0 12px 24px -14px rgba(26, 143, 196, 1), inset 0 1px 0 rgba(255, 255, 255, 0.25);
    color: #ffffff;
    font-size: 14.5px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    text-transform: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
}

.wc-2fa-banner.wc-2fa-banner a.wc-2fa-banner-btn:hover {
    background: linear-gradient(180deg, #2aaee8, #1c97cf);
    color: #ffffff;
    text-decoration: none;
}

.wc-2fa-banner.wc-2fa-banner a.wc-2fa-banner-btn:focus-visible {
    outline: 2px solid #1a8fc4;
    outline-offset: 3px;
}

.wc-2fa-banner.wc-2fa-banner a.wc-2fa-banner-btn svg {
    flex: none;
    width: 16px;
    height: 16px;
}

.wc-2fa-banner.wc-2fa-banner a.wc-2fa-banner-btn.wc-2fa-banner-btn-secondary {
    background: #ffffff;
    box-shadow: inset 0 0 0 1px #b9dfc8;
    color: #14532d;
}

.wc-2fa-banner.wc-2fa-banner a.wc-2fa-banner-btn.wc-2fa-banner-btn-secondary:hover {
    background: #ffffff;
    box-shadow: inset 0 0 0 1px #16a34a;
    color: #166534;
}

@media (max-width: 600px) {
    .wc-2fa-banner.wc-2fa-banner {
        flex-wrap: wrap;
        align-items: flex-start;
        gap: 12px 14px;
        padding: 14px;
    }

    .wc-2fa-banner.wc-2fa-banner .wc-2fa-banner-icon {
        width: 42px;
        height: 42px;
        border-radius: 12px;
    }

    .wc-2fa-banner.wc-2fa-banner .wc-2fa-banner-icon svg {
        width: 21px;
        height: 21px;
    }

    .wc-2fa-banner.wc-2fa-banner .wc-2fa-banner-content {
        flex: 1 1 calc(100% - 56px);
    }

    .wc-2fa-banner.wc-2fa-banner .wc-2fa-banner-title {
        font-size: 15.5px;
    }

    .wc-2fa-banner.wc-2fa-banner .wc-2fa-banner-text {
        font-size: 14px;
    }

    .wc-2fa-banner.wc-2fa-banner a.wc-2fa-banner-btn {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .wc-2fa-banner.wc-2fa-banner a.wc-2fa-banner-btn {
        transition: none;
    }
}


/* =====================================================
   COMPACT CODE FIELD (2.3.0): six single-digit boxes, one line with "Trust this device".
   Selectors are raised on purpose: Flatsome, WooCommerce and wp-login.php all style
   input[type=text] and label, and the older .wc-2fa-login-field rules above style every input.
   ===================================================== */
.wc-2fa-login-field.wc-2fa-compact {
    margin: 0 0 16px;
    padding: 0;
    background: none;
    border: 0;
    border-radius: 0;
}

.wc-2fa-compact .wc-2fa-field-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 4px 12px;
    flex-wrap: wrap;
    margin: 0 0 6px;
}

.wc-2fa-login-field.wc-2fa-compact label.wc-2fa-code-label {
    display: inline;
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--wc2fa-text);
}

.wc-2fa-compact .wc-2fa-optional {
    font-weight: 400;
    font-size: 0.8rem;
    color: var(--wc2fa-text-muted);
}

.wc-2fa-compact button.wc-2fa-mode {
    appearance: none;
    margin: 0;
    padding: 0;
    min-width: 0;
    min-height: 0;
    border: 0;
    background: none;
    box-shadow: none;
    color: var(--wc2fa-main);
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: normal;
    text-transform: none;
    text-decoration: underline;
    cursor: pointer;
}

.wc-2fa-compact button.wc-2fa-mode:hover {
    background: none;
    box-shadow: none;
    color: var(--wc2fa-soft-dark);
}

.wc-2fa-compact button.wc-2fa-mode[hidden] {
    display: none;
}

.wc-2fa-compact .wc-2fa-field-body {
    display: flex;
    align-items: flex-end; /* "Trust this device" sits on the bottom line of the boxes */
    flex-wrap: wrap;
    gap: 10px 20px;
}

.wc-2fa-otp {
    display: flex;
    gap: 6px;
}

.wc-2fa-otp[hidden] {
    display: none;
}

.wc-2fa-otp input[type='text'].wc-2fa-otp-box {
    width: 40px;
    height: 44px;
    min-height: 0;
    max-width: none;
    margin: 0;
    padding: 0;
    border: 1.5px solid #d3dbe3;
    border-radius: 8px;
    background: #fff;
    box-shadow: none;
    color: var(--wc2fa-text);
    font-size: 1.15rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    text-align: center;
    caret-color: var(--wc2fa-main);
    transition: border-color .15s ease, box-shadow .15s ease;
}

.wc-2fa-otp input[type='text'].wc-2fa-otp-box--split {
    margin-left: 6px;
}

.wc-2fa-otp input[type='text'].wc-2fa-otp-box:focus {
    border-color: var(--wc2fa-main);
    box-shadow: 0 0 0 3px rgba(var(--wc2fa-main-rgb), .15);
    outline: none;
}

.wc-2fa-otp.is-invalid input[type='text'].wc-2fa-otp-box {
    border-color: var(--wc2fa-danger);
}

/* The real field stays in the form (it is what gets submitted) but is hidden while the boxes show. */
.wc-2fa-login-field input[type='text'].wc-2fa-code-input--hidden,
input[type='text'].wc-2fa-code-input--hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    min-height: 0 !important;
    margin: -1px !important;
    padding: 0 !important;
    border: 0 !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    opacity: 0 !important;
}

/* Backup-code mode (and no-script fallback): a compact text field instead of a full-width one.
   max-width needs !important: the My Account login CSS sets max-width:none!important on every input. */
.wc-2fa-login-field.wc-2fa-compact input[type='text'].wc-2fa-code-input {
    width: 100%;
    max-width: 264px !important;
    height: 44px;
    min-height: 0;
    margin: 0;
    padding: 0 12px;
    border: 1.5px solid #d3dbe3;
    border-radius: 8px;
    background: #fff;
    box-shadow: none;
    font-size: 1rem;
    letter-spacing: .08em;
}

.wc-2fa-login-field.wc-2fa-compact input[type='text'].wc-2fa-code-input:focus {
    border-color: var(--wc2fa-main);
    box-shadow: 0 0 0 3px rgba(var(--wc2fa-main-rgb), .15);
    outline: none;
}

.wc-2fa-otp-msg {
    display: block;
    color: #c53030; /* 5.5:1 on white */
    font-size: 0.8rem;
}

.wc-2fa-otp-msg:empty {
    display: none;
}

.wc-2fa-login-field.wc-2fa-compact label.wc-2fa-trust-device {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 0.85rem;
    font-weight: 400;
    line-height: 1.4;
    color: var(--wc2fa-text-muted);
    cursor: pointer;
}

.wc-2fa-login-field.wc-2fa-compact .wc-2fa-trust-device input[type='checkbox'] {
    width: 16px;
    height: 16px;
    margin: 0;
    flex: 0 0 auto;
    accent-color: var(--wc2fa-main);
}

/* wp-login.php: the form is 272px wide inside, so slightly smaller boxes. */
.login .wc-2fa-otp input[type='text'].wc-2fa-otp-box {
    width: 36px;
    height: 42px;
    font-size: 1.1rem;
}

.login .wc-2fa-compact .wc-2fa-field-body {
    gap: 10px;
}

@media (max-width: 400px) {
    .wc-2fa-otp {
        gap: 5px;
    }

    .wc-2fa-otp input[type='text'].wc-2fa-otp-box {
        width: 38px;
    }
}

/* =====================================================
   2FA PAGE (2.5.0) - [wc_2fa_settings] on /my-account/2fa-security/
   A status card (off / setup / on), then light cards: how it works, setup steps, backup
   codes, manage. Same tokens as the My Account pages (1px #e2e8f0 cards, radius 18, pill
   buttons). Flatsome styles every <button>, h2/h3 and input, so those are reset here.
   ===================================================== */
.wc-2fa-settings {
    --wc2fa-ink: #0f1b2a;
    --wc2fa-ink-2: #46556a;
    --wc2fa-mute: #6b7a8f;
    --wc2fa-line: #e2e8f0;
    --wc2fa-line-soft: #edf1f5;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    margin: 0;
    color: var(--wc2fa-ink);
}

.wc-2fa-settings :where(h2, h3, p, ol, ul, li, dl, dt, dd) { margin: 0; padding: 0; }
.wc-2fa-settings :where(ol, ul) { list-style: none; }
/* The theme indents list items (margin-left on ol/ul li); the doubled class beats it without !important. */
.wc-2fa-settings.wc-2fa-settings :is(ol, ul) { margin-left: 0; }
.wc-2fa-settings.wc-2fa-settings :is(ol, ul) > li { margin: 0; }
.wc-2fa-settings svg { display: block; flex: none; }
.wc-2fa-settings h2,
.wc-2fa-settings h3 { width: auto; color: var(--wc2fa-ink); text-transform: none; }
.wc-2fa-settings h2::before, .wc-2fa-settings h2::after,
.wc-2fa-settings h3::before, .wc-2fa-settings h3::after { content: none; display: none; }

/* Notices */
.wc-2fa-settings .wc-2fa-error,
.wc-2fa-settings .wc-2fa-success { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 14px; font-size: 14.5px; font-weight: 600; line-height: 1.45; }
.wc-2fa-settings .wc-2fa-error { border: 1px solid #f3c4c4; background: #fdf2f2; color: #b91c1c; }
.wc-2fa-settings .wc-2fa-success { border: 1px solid #bfe5cc; background: #effaf3; color: #15803d; }
.wc-2fa-error:focus,
.wc-2fa-success:focus { outline: none; }

/* Status card */
.wc-2fa-status-card { display: flex; align-items: center; gap: 16px; padding: 20px 22px; border: 1px solid #f1d9a8; border-radius: 18px; background: radial-gradient(90% 160% at 0% 0%, #fff1d4 0%, rgba(255, 241, 212, 0) 60%), linear-gradient(90deg, #fffaf0 0%, #ffffff 70%); box-shadow: 0 1px 2px rgba(15, 27, 42, 0.04), 0 18px 36px -30px rgba(180, 110, 20, 0.55); }
.wc-2fa-status-card.is-on { border-color: #c6ead3; background: radial-gradient(90% 160% at 0% 0%, #dcf5e6 0%, rgba(220, 245, 230, 0) 60%), linear-gradient(90deg, #f3fbf6 0%, #ffffff 70%); box-shadow: 0 1px 2px rgba(15, 27, 42, 0.04), 0 18px 36px -30px rgba(22, 120, 70, 0.5); }
.wc-2fa-status-card.is-setup { border-color: #cfe3f1; background: radial-gradient(90% 160% at 0% 0%, #e2f0fa 0%, rgba(226, 240, 250, 0) 60%), linear-gradient(90deg, #f5fafe 0%, #ffffff 70%); box-shadow: 0 1px 2px rgba(15, 27, 42, 0.04), 0 18px 36px -30px rgba(13, 107, 154, 0.5); }
.wc-2fa-status-card__icon { display: grid; place-items: center; flex: none; width: 52px; height: 52px; border-radius: 16px; background: linear-gradient(180deg, #f6b545, #e8930c); box-shadow: 0 0 0 4px #ffffff, 0 10px 20px -10px rgba(180, 110, 20, 0.8); color: #ffffff; }
.wc-2fa-status-card.is-on .wc-2fa-status-card__icon { background: linear-gradient(180deg, #34c472, #16a34a); box-shadow: 0 0 0 4px #ffffff, 0 10px 20px -10px rgba(22, 120, 70, 0.8); }
.wc-2fa-status-card.is-setup .wc-2fa-status-card__icon { background: linear-gradient(180deg, #23a3dc, #1a8fc4); box-shadow: 0 0 0 4px #ffffff, 0 10px 20px -10px rgba(13, 107, 154, 0.8); }
.wc-2fa-status-card__icon svg { width: 25px; height: 25px; }
.wc-2fa-status-card__body { flex: 1 1 auto; min-width: 0; }
.wc-2fa-settings .wc-2fa-eyebrow { color: var(--wc2fa-mute); font-size: 12px; font-weight: 700; letter-spacing: 0.06em; line-height: 1.4; text-transform: uppercase; }
.wc-2fa-settings h2.wc-2fa-status-card__title { margin: 2px 0 4px; font-size: 20px; font-weight: 800; letter-spacing: -0.01em; line-height: 1.25; }
.wc-2fa-settings .wc-2fa-status-card__text { max-width: 62ch; color: var(--wc2fa-ink-2); font-size: 14.5px; line-height: 1.5; }
.wc-2fa-status-card__action { flex: none; margin: 0; }

.wc-2fa-settings dl.wc-2fa-facts { display: grid; flex: none; grid-template-columns: repeat(2, auto); gap: 4px 22px; }
.wc-2fa-facts > div { display: flex; flex-direction: column; gap: 1px; }
.wc-2fa-settings .wc-2fa-facts dt { color: var(--wc2fa-mute); font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.wc-2fa-settings .wc-2fa-facts dd { color: var(--wc2fa-ink); font-size: 15px; font-weight: 700; letter-spacing: 0; text-transform: none; font-variant-numeric: tabular-nums; }
.wc-2fa-settings .wc-2fa-facts .is-low dd { color: #b45309; }

/* Cards */
.wc-2fa-card,
.wc-2fa-onetime-codes { border: 1px solid var(--wc2fa-line); border-radius: 18px; background: #ffffff; }
.wc-2fa-card__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 14px 20px; border-bottom: 1px solid var(--wc2fa-line-soft); }
.wc-2fa-settings h3.wc-2fa-card__title { font-size: 17px; font-weight: 800; letter-spacing: -0.01em; line-height: 1.3; }
.wc-2fa-card__body { padding: 16px 20px 20px; }
.wc-2fa-settings .wc-2fa-card__foot { padding: 12px 20px 16px; border-top: 1px solid var(--wc2fa-line-soft); color: var(--wc2fa-ink-2); font-size: 14px; line-height: 1.5; }
.wc-2fa-settings .wc-2fa-muted { color: var(--wc2fa-mute); font-size: 14px; line-height: 1.5; }
.wc-2fa-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; background: #eef2f6; color: #475569; font-size: 12.5px; font-weight: 700; line-height: 1.4; white-space: nowrap; }
.wc-2fa-chip.is-warn { background: #fff4e0; color: #b45309; }

/* How it works / setup steps */
.wc-2fa-settings ol.wc-2fa-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; padding: 18px 20px; }
.wc-2fa-steps > li { display: flex; align-items: flex-start; gap: 12px; }
.wc-2fa-steps > li > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.wc-2fa-steps strong { color: var(--wc2fa-ink); font-size: 15px; font-weight: 800; line-height: 1.35; }
.wc-2fa-steps span:not(.wc-2fa-steps__num) { color: var(--wc2fa-ink-2); font-size: 14px; line-height: 1.5; }
.wc-2fa-steps__num { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%; background: #e8f3fb; color: #0d7ab0; font-size: 13.5px; font-weight: 800; font-variant-numeric: tabular-nums; }

.wc-2fa-settings ol.wc-2fa-setup > li.wc-2fa-setup__step { display: flex; align-items: flex-start; gap: 14px; padding: 18px 20px; }
.wc-2fa-settings ol.wc-2fa-setup > li.wc-2fa-setup__step + li.wc-2fa-setup__step { border-top: 1px solid var(--wc2fa-line-soft); }
.wc-2fa-setup__body { display: flex; flex: 1 1 auto; flex-direction: column; gap: 6px; min-width: 0; }
.wc-2fa-setup__step .wc-2fa-steps__num { margin-top: -2px; }
.wc-2fa-confirm-form { margin: 6px 0 0; }

/* QR code + key */
.wc-2fa-setup-key { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin: 8px 0 0; }
.wc-2fa-qr { flex: none; padding: 10px; border: 1px solid var(--wc2fa-line); border-radius: 16px; background: #ffffff; }
.wc-2fa-qr img { display: block; width: 148px; height: 148px; background: #fff; /* the SVG draws only the dark modules */ }
.wc-2fa-key { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; }
.wc-2fa-settings .wc-2fa-label-sm { color: var(--wc2fa-ink-2); font-size: 13.5px; font-weight: 700; line-height: 1.4; }
.wc-2fa-settings .wc-2fa-key-text { display: inline-block; max-width: 100%; padding: 10px 14px; border: 1px solid #d5e0ea; border-radius: 12px; background: #f8fafc; color: var(--wc2fa-ink); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 15px; letter-spacing: 0.06em; overflow-wrap: anywhere; user-select: all; }
.wc-2fa-settings .wc-2fa-key-link { display: inline-flex; align-items: center; gap: 6px; color: #0d7ab0; font-size: 14px; font-weight: 700; text-decoration: none; }
.wc-2fa-settings .wc-2fa-key-link:hover { color: #1a8fc4; text-decoration: underline; }
.wc-2fa-key-link svg { width: 16px; height: 16px; }

/* The code field on this page */
.wc-2fa-page-field { margin: 4px 0 0; }
.wc-2fa-page-field .wc-2fa-field-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; max-width: 320px; }
.wc-2fa-page-field .wc-2fa-otp { margin: 6px 0 0; }
.wc-2fa-settings input[type='text'].wc-2fa-code-input { width: 100%; max-width: 220px; height: 44px; margin: 6px 0 0; padding: 0 14px; border: 1.5px solid #d3dbe3; border-radius: 10px; background: #fff; box-shadow: none; color: var(--wc2fa-ink); font-size: 16px; letter-spacing: 0.08em; }
.wc-2fa-settings input[type='text'].wc-2fa-code-input:focus { border-color: var(--wc2fa-main); box-shadow: 0 0 0 3px rgba(var(--wc2fa-main-rgb), .15); outline: none; }
.wc-2fa-settings .wc-2fa-page-field button.wc-2fa-mode { width: auto; min-width: 0; min-height: 0; margin: 0; padding: 0; border: 0; background: none; box-shadow: none; color: #0d7ab0; font-size: 13px; font-weight: 700; letter-spacing: 0; line-height: 1.4; text-decoration: underline; text-transform: none; transform: none; }
.wc-2fa-settings .wc-2fa-page-field button.wc-2fa-mode:hover { background: none; box-shadow: none; color: #1a8fc4; }
.wc-2fa-settings .wc-2fa-page-field button.wc-2fa-mode[hidden] { display: none; }

/* Buttons (pills) */
.wc-2fa-settings .wc-2fa-buttons { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 14px 0 0; }
.wc-2fa-settings .wc-2fa-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; min-height: 0; margin: 0; padding: 0 20px; border: 0; border-radius: 50px; font-family: inherit; font-size: 14.5px; font-weight: 700; letter-spacing: 0; line-height: 1; text-decoration: none; text-transform: none; white-space: nowrap; cursor: pointer; transition: background-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease; }
.wc-2fa-settings .wc-2fa-btn svg { width: 16px; height: 16px; }
.wc-2fa-settings .wc-2fa-btn.is-small { height: 36px; padding: 0 15px; font-size: 13.5px; }
.wc-2fa-settings .wc-2fa-btn.is-small svg { width: 15px; height: 15px; }
.wc-2fa-settings .wc-2fa-btn.is-primary { background: linear-gradient(180deg, #23a3dc, #1a8fc4); box-shadow: 0 12px 24px -14px rgba(26, 143, 196, 1), inset 0 1px 0 rgba(255, 255, 255, 0.25); color: #ffffff; }
.wc-2fa-settings .wc-2fa-btn.is-primary:hover { background: linear-gradient(180deg, #2aaee8, #1c97cf); color: #ffffff; }
.wc-2fa-settings .wc-2fa-btn.is-primary.is-done { background: linear-gradient(180deg, #34c472, #16a34a); }
.wc-2fa-settings .wc-2fa-btn.is-ghost { background: #ffffff; box-shadow: inset 0 0 0 1px #c9dbe8; color: var(--wc2fa-ink); }
.wc-2fa-settings .wc-2fa-btn.is-ghost:hover { box-shadow: inset 0 0 0 1px #1a8fc4; color: #0d7ab0; }
.wc-2fa-settings .wc-2fa-btn.is-danger { background: #ffffff; box-shadow: inset 0 0 0 1px #f0c2c2; color: #b91c1c; }
.wc-2fa-settings .wc-2fa-btn.is-danger:hover { background: #fdf2f2; box-shadow: inset 0 0 0 1px #dc2626; color: #b91c1c; }
.wc-2fa-settings .wc-2fa-btn:focus-visible,
.wc-2fa-settings .wc-2fa-key-link:focus-visible { outline: 2px solid #1a8fc4; outline-offset: 2px; }

/* Manage */
.wc-2fa-manage { padding: 16px 20px 6px; }
.wc-2fa-settings ul.wc-2fa-actions { margin: 16px -20px 0; border-top: 1px solid var(--wc2fa-line-soft); }
.wc-2fa-settings ul.wc-2fa-actions > li { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 14px 20px; }
.wc-2fa-settings ul.wc-2fa-actions > li + li { border-top: 1px solid var(--wc2fa-line-soft); }
.wc-2fa-actions__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.wc-2fa-actions__text strong { color: var(--wc2fa-ink); font-size: 15px; font-weight: 800; line-height: 1.35; }
.wc-2fa-actions__text span { color: var(--wc2fa-ink-2); font-size: 14px; line-height: 1.45; }

/* Backup codes (shown once) */
.wc-2fa-onetime-codes { border-color: #f1d9a8; box-shadow: 0 18px 36px -30px rgba(180, 110, 20, 0.55); }
.wc-2fa-onetime-codes .wc-2fa-card__head { background: #fffaf0; border-radius: 18px 18px 0 0; }
.wc-2fa-onetime-codes__body { padding: 16px 20px 18px; }
.wc-2fa-settings .wc-2fa-onetime-codes__body > p:first-child { max-width: 66ch; color: var(--wc2fa-ink-2); font-size: 14.5px; line-height: 1.5; }
.wc-2fa-settings .wc-2fa-onetime-codes ul.code-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 14px 0 0; }
.wc-2fa-settings .wc-2fa-onetime-codes ul.code-list > li { padding: 10px 8px; border: 1px solid #d5e0ea; border-radius: 10px; background: #f8fafc; color: var(--wc2fa-ink); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 15px; font-weight: 600; letter-spacing: 0.06em; text-align: center; user-select: all; }
.wc-2fa-onetime-codes .wc-2fa-buttons + .wc-2fa-muted { margin-top: 10px; }

@media (max-width: 849px) {
    .wc-2fa-status-card { flex-wrap: wrap; }
    .wc-2fa-status-card__body { flex-basis: calc(100% - 68px); }
    .wc-2fa-settings ol.wc-2fa-steps { grid-template-columns: minmax(0, 1fr); gap: 14px; }
}

@media (max-width: 600px) {
    .wc-2fa-settings { gap: 12px; }
    .wc-2fa-status-card { align-items: flex-start; gap: 14px; padding: 16px; }
    .wc-2fa-status-card__icon { width: 44px; height: 44px; border-radius: 13px; }
    .wc-2fa-status-card__icon svg { width: 22px; height: 22px; }
    .wc-2fa-status-card__body { flex-basis: calc(100% - 58px); }
    .wc-2fa-settings h2.wc-2fa-status-card__title { font-size: 18px; }
    .wc-2fa-status-card__action,
    .wc-2fa-status-card__action .wc-2fa-btn { width: 100%; }
    .wc-2fa-card__head { padding: 12px 16px; }
    .wc-2fa-settings ol.wc-2fa-steps { padding: 16px; }
    .wc-2fa-settings ol.wc-2fa-setup > li.wc-2fa-setup__step { padding: 16px; gap: 12px; }
    .wc-2fa-manage { padding: 14px 16px 4px; }
    .wc-2fa-settings ul.wc-2fa-actions { margin: 14px -16px 0; }
    .wc-2fa-settings ul.wc-2fa-actions > li { flex-wrap: wrap; padding: 12px 16px; }
    .wc-2fa-settings ul.wc-2fa-actions .wc-2fa-btn { width: 100%; }
    .wc-2fa-onetime-codes__body { padding: 14px 16px 16px; }
    .wc-2fa-settings .wc-2fa-onetime-codes ul.code-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .wc-2fa-settings .wc-2fa-buttons .wc-2fa-btn { flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
    .wc-2fa-settings .wc-2fa-btn { transition: none; }
}
