/* The header indicator is shared by the App and the storefront. */
.mb-security-count[hidden] { display: none !important; }
.mb-security-count:not([hidden]) {
    display: inline-grid;
    place-items: center;
    box-sizing: border-box;
    width: 1.25rem;
    height: 1.25rem;
    flex: 0 0 1.25rem;
    padding: 0;
    border-radius: 50%;
    background: #f7c984;
    color: #482707;
    font: 750 .72rem/1 system-ui, sans-serif;
    text-indent: 0;
    letter-spacing: 0;
}
.site-header [data-account-entry],
.mb42 .mb42-top .mb42-account,
.mbx-app-top .mbx-avatar { position: relative; }
.site-header [data-account-entry] > .mb-security-count:not([hidden]),
.mb42 .mb42-top .mb42-account > .mb-security-count:not([hidden]),
.mbx-app-top .mbx-avatar > .mb-security-count:not([hidden]) {
    position: absolute;
    z-index: 1;
    inset-block-start: -.25rem;
    inset-inline-end: -.25rem;
    box-shadow: 0 0 0 2px #0c151f;
}
html:is([data-mb-theme="light"], [data-mb-panel-theme="light"], [data-theme="light"])
    :is(.site-header, .mb42-top, .mbx-app-top) .mb-security-count:not([hidden]) {
    box-shadow: 0 0 0 2px #f4f9fb;
}

.mb-protection {
    --protect-panel: #12222f;
    --protect-input: #0b1723;
    --protect-line: #304c5c;
    --protect-text: #edf7fc;
    --protect-muted: #b0c5d4;
    --protect-accent: #82e5ea;
    --protect-tint: #193d48;
    --protect-action: #43d5e1;
    --protect-action-hover: #88e6ed;
    --protect-focus: #92eef5;
    --protect-warm-bg: #352c20;
    --protect-warm-text: #f7cf8f;
    --protect-green-bg: #193c37;
    --protect-green-text: #a2eac8;
    --protect-error-bg: #3a2530;
    --protect-error-text: #ffd4d8;
    color: var(--protect-text);
}
html:is([data-theme="light"], [data-mb-panel-theme="light"]) .mb-protection {
    --protect-panel: #fff;
    --protect-input: #f2f8fa;
    --protect-line: #b6cdd8;
    --protect-text: #183141;
    --protect-muted: #415f70;
    --protect-accent: #125d72;
    --protect-tint: #e0f2f6;
    --protect-action: #32c4d3;
    --protect-action-hover: #65d8e1;
    --protect-focus: #116479;
    --protect-warm-bg: #fff0d6;
    --protect-warm-text: #7a430c;
    --protect-green-bg: #e0f4e9;
    --protect-green-text: #175943;
    --protect-error-bg: #fbe9eb;
    --protect-error-text: #852f45;
}
.mb-protection :is(h1, h2) {
    margin: 0;
    color: var(--protect-text);
    line-height: 1.18;
    letter-spacing: -.025em;
}
.mb-protection h1 { font-size: clamp(1.65rem, 3.2vw, 2.35rem); }
.mb-protection h2 { font-size: clamp(1.12rem, 2.1vw, 1.45rem); }
.mb-protection p { margin: 0; color: var(--protect-muted); line-height: 1.55; }
.mb-protection-icon {
    width: 3rem;
    height: 3rem;
    display: inline-grid;
    flex: 0 0 3rem;
    place-items: center;
    border: 1px solid var(--protect-line);
    border-radius: .85rem;
    background: var(--protect-tint);
    color: var(--protect-accent);
}
.mb-protection-icon svg { width: 1.5rem; height: 1.5rem; }
.mb-protection-label,
.mb-protection-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .55rem; }
.mb-protection-label { font-size: .82rem; font-weight: 650; color: var(--protect-muted); }
.mb-protection-state {
    display: inline-flex;
    align-items: center;
    padding: .28rem .58rem;
    border-radius: 2rem;
    background: var(--protect-warm-bg);
    color: var(--protect-warm-text);
    font-size: .76rem;
    font-weight: 700;
    line-height: 1.25;
    white-space: nowrap;
}
.mb-protection-state.is-active { background: var(--protect-green-bg); color: var(--protect-green-text); }
.mb-protection-copy { min-width: 0; display: grid; gap: .45rem; }
.mb-protection-banner,
.mb-protection-settings-top {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: clamp(.8rem, 2vw, 1.35rem);
    padding: clamp(1rem, 2.5vw, 1.75rem);
    border: 1px solid var(--protect-line);
    border-radius: 1rem;
    background: linear-gradient(115deg, var(--protect-tint), var(--protect-panel) 75%);
}
.mb-protection-banner { margin: 0 0 1.4rem; scroll-margin-top: 7rem; }
.mb-protection :is(a, button, summary).mb-protection-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .7rem;
    min-height: 2.8rem;
    padding: .65rem .95rem;
    border-radius: .6rem;
    border: 1px solid transparent;
    background: var(--protect-action);
    color: #09242b;
    font-family: inherit;
    font-size: .9rem;
    font-weight: 700;
    line-height: 1.3;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
}
.mb-protection :is(a, button, summary).mb-protection-button:hover { background: var(--protect-action-hover); color: #09242b; }
.mb-protection :is(a, button, summary).mb-protection-button.is-secondary {
    border-color: var(--protect-line);
    background: var(--protect-input);
    color: var(--protect-text);
}
.mb-protection :is(a, button, summary).mb-protection-button.is-secondary:hover { border-color: var(--protect-accent); }
.mb-protection :focus-visible {
    outline: 2px solid var(--protect-focus);
    outline-offset: 3px;
}
.mb-protection-settings { display: grid; gap: 1.25rem; max-width: 72rem; }
.mb-protection .mb-protection-back {
    width: fit-content;
    padding-block: .3rem;
    color: var(--protect-accent);
    font-size: .9rem;
    font-weight: 650;
    text-decoration: none;
}
.mb-protection .mb-protection-back:hover { text-decoration: underline; }
.mb-protection-methods { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; align-items: start; }
.mb-protection-method,
.mb-protection-challenge {
    display: grid;
    gap: .85rem;
    padding: clamp(1rem, 2.8vw, 1.6rem);
    border: 1px solid var(--protect-line);
    border-radius: 1rem;
    background: var(--protect-panel);
}
.mb-protection-method-head { display: flex; justify-content: space-between; align-items: flex-start; gap: .65rem; }
.mb-protection-method p { min-height: 3.1em; }
.mb-protection summary { list-style: none; }
.mb-protection summary::-webkit-details-marker { display: none; }
.mb-protection details[open] > summary span { transform: rotate(90deg); }
.mb-protection details > summary { width: fit-content; }
.mb-protection-form { display: grid; gap: .55rem; margin: 0; }
.mb-protection details .mb-protection-form { margin-top: 1rem; }
.mb-protection :is(.mb-protection-form, .mb-protection-setup) label { display: block; font-size: .9rem; font-weight: 650; }
.mb-protection :is(.mb-protection-form, .mb-protection-setup) input:not([type=hidden]) {
    display: block;
    box-sizing: border-box;
    width: 100%;
    min-height: 2.8rem;
    padding: .6rem .75rem;
    border: 1px solid var(--protect-line);
    border-radius: .55rem;
    color: var(--protect-text);
    background: var(--protect-input);
    font: inherit;
}
.mb-protection .mb-protection-form .mb-protection-code { max-width: 13rem; font-weight: 700; letter-spacing: .16em; }
.mb-protection-form .mb-protection-button { justify-self: start; margin-top: .3rem; }
.mb-protection-challenge { width: min(100%, 43rem); box-sizing: border-box; }
.mb-protection-setup { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
.mb-protection-setup > div { flex: 1 1 14rem; min-width: 0; }
.mb-protection-setup label { margin-bottom: .4rem; }
.mb-protection-setup .mb-security-qr:not([hidden]) { width: 9.5rem; margin: 0; }
.mb-protection .mb-protection-feedback {
    padding: .85rem 1rem;
    border-radius: .65rem;
    background: var(--protect-error-bg);
    color: var(--protect-error-text);
}
.mb-protection .mb-protection-feedback.is-success { background: var(--protect-green-bg); color: var(--protect-green-text); }
@media (max-width: 1280px) {
    .mb-protection-banner { grid-template-columns: auto minmax(0, 1fr); }
    .mb-protection-banner > .mb-protection-button { grid-column: 2; justify-self: start; }
}
@media (max-width: 620px) {
    .mb-protection-settings-top { grid-template-columns: auto minmax(0, 1fr); }
    .mb-protection-settings-top > .mb-protection-state { grid-column: 2; justify-self: start; }
    .mb-protection-banner > .mb-protection-button { grid-column: 1 / -1; justify-self: stretch; }
    .mb-protection-methods { grid-template-columns: minmax(0, 1fr); }
    .mb-protection-method p { min-height: 0; }
}
