/* Site-owned presentation for the unmodified Email Auth forms, including its no-JS shell. */
:is(.cr-utility-page, .email-auth-page) .email-auth-card {
    --cr-ea-bg: #fff;
    --cr-ea-text: #17253b;
    --cr-ea-muted: #45556b;
    --cr-ea-border: #8091a8;
    --cr-ea-link: #2054be;
    --cr-ea-error: #951d2e;
    background: var(--cr-ea-bg);
    color: var(--cr-ea-text);
    border-color: var(--cr-ea-border);
    max-width: 100%;
}
.cr-utility-page .email-auth-card { margin: 0; box-shadow: none; }
:is(.cr-utility-page, .email-auth-page) .email-auth-card :is(h1, label) { color: var(--cr-ea-text); }
:is(.cr-utility-page, .email-auth-page) .email-auth-card :is(.email-auth-message, .email-auth-site, .email-auth-loading) { color: var(--cr-ea-muted); }
:is(.cr-utility-page, .email-auth-page) .email-auth-card .email-auth-error { color: var(--cr-ea-error); }
:is(.cr-utility-page, .email-auth-page) .email-auth-card :is(input[type=text], input[type=password]) {
    color: var(--cr-ea-text);
    background: var(--cr-ea-bg);
    border-color: var(--cr-ea-border);
}
:is(.cr-utility-page, .email-auth-page) .email-auth-links a { color: var(--cr-ea-link); }
.cr-utility-page .email-auth-card .email-auth-remember input { appearance: auto; opacity: 1; position: static; flex: 0 0 18px; }
html[data-cr-theme="dark"] :is(.cr-utility-page, .email-auth-page) .email-auth-card {
    --cr-ea-bg: #172337;
    --cr-ea-text: #f1f5fb;
    --cr-ea-muted: #c2cfe0;
    --cr-ea-border: #8495ad;
    --cr-ea-link: #a5c5ff;
    --cr-ea-error: #ffb4bf;
}
@media (prefers-color-scheme: dark) {
    html:not([data-cr-theme="light"]) .email-auth-page { background: #101a2b; }
    html:not([data-cr-theme="light"]) :is(.cr-utility-page, .email-auth-page) .email-auth-card {
        --cr-ea-bg: #172337;
        --cr-ea-text: #f1f5fb;
        --cr-ea-muted: #c2cfe0;
        --cr-ea-border: #8495ad;
        --cr-ea-link: #a5c5ff;
        --cr-ea-error: #ffb4bf;
    }
}

/* Match the native registration pane instead of nesting the plugin's standalone card. */
.cr-utility-page--account .cr-email-auth-shell {
    --cr-ea-field-bg: var(--e-global-color-lcolor5, #fdfdfe);
    --cr-ea-field-border: var(--e-global-color-lcolor3, #d5e3ee);
    --cr-ea-text: var(--e-global-color-lcolor1, #2a3946);
    --cr-ea-muted: #45556b;
    --cr-ea-link: #1d5f9f;
    --cr-ea-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3E%3Crect width='30' height='30' rx='5' fill='%23f39966'/%3E%3Cg fill='none' stroke='white' stroke-width='1.6'%3E%3Ccircle cx='15' cy='11' r='4'/%3E%3Cpath d='M8 24v-2a7 7 0 0 1 14 0v2M11 17a4 4 0 0 0 8 0'/%3E%3C/g%3E%3C/svg%3E");
    box-sizing: border-box;
    padding: 0 var(--e-global-size-2, 60px) var(--e-global-size-2, 60px);
    width: 100%;
}
.cr-utility-page--account .cr-auth-pane--login:has(.cr-email-auth-shell) > .cr-auth-pane__title {
    display: none;
}
.cr-utility-page--account .cr-email-auth-shell .email-auth-card {
    --cr-ea-text: var(--e-global-color-lcolor1, #2a3946);
    --cr-ea-muted: #45556b;
    --cr-ea-link: #1d5f9f;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    color: var(--cr-ea-text);
    font-family: inherit;
    margin: 0;
    max-width: none;
    padding: 0;
    width: 100%;
}
.cr-utility-page--account .cr-email-auth-shell .email-auth-site,
.cr-utility-page--account .cr-email-auth-shell .email-auth-logo {
    display: none;
}
.cr-utility-page--account .cr-email-auth-shell .email-auth-card h1 {
    color: var(--cr-light-text-color, #2a3946);
    font-family: var(--cr-title-font-family, inherit) !important;
    font-size: 1.5rem;
    font-weight: var(--cr-title-font-weight, 500) !important;
    line-height: 1.2;
    margin: 0 0 18px;
}
.cr-utility-page--account .cr-email-auth-shell .email-auth-card label {
    color: var(--cr-light-text-color, #2a3946);
    font-size: .92rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 10px;
}
.cr-utility-page--account .cr-email-auth-shell .email-auth-card :is(input[type=text], input[type=password]) {
    background-color: var(--cr-ea-field-bg);
    background-image: var(--cr-ea-icon);
    background-position: 15px center;
    background-repeat: no-repeat;
    background-size: 30px;
    border: 1px solid var(--cr-ea-field-border);
    border-radius: var(--e-global-lborder-radius, 5px);
    color: var(--cr-ea-text);
    font-family: var(--e-global-typography-ltext1-font-family, inherit);
    font-size: var(--e-global-typography-ltext1-font-size, 16px);
    font-weight: var(--e-global-typography-ltext1-font-weight, 400);
    height: 61px;
    line-height: var(--e-global-typography-ltext1-line-height, 29px);
    margin: 0 0 24px;
    padding: 15px 15px 15px 60px;
}
.cr-utility-page--account .cr-email-auth-shell .email-auth-card button {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--e-global-color-lprimary2, #f39966);
    border-radius: var(--e-global-lborder-radius, 5px);
    color: var(--e-global-color-lcolor5, #fdfdfe);
    font-family: var(--e-global-typography-llabel-font-family, inherit);
    font-size: var(--e-global-typography-llabel-font-size, 14px);
    font-weight: var(--e-global-typography-llabel-font-weight, 700);
    height: 60px;
    line-height: 1.3;
    padding: 0 24px;
}
.cr-utility-page--account .cr-email-auth-shell .email-auth-card button:hover {
    background: var(--e-global-color-lprimary2, #f39966);
    filter: brightness(.96);
}
.cr-utility-page--account .cr-email-auth-shell .email-auth-card .email-auth-remember {
    font-size: .88rem;
    font-weight: 400;
    margin: 0 0 24px;
}
.cr-utility-page--account .cr-email-auth-shell .email-auth-message,
.cr-utility-page--account .cr-email-auth-shell .email-auth-loading {
    color: var(--cr-ea-muted);
    font-size: .88rem;
    line-height: 1.6;
}
.cr-utility-page--account .cr-email-auth-shell .email-auth-card .email-auth-error { color: var(--cr-ea-error); }
.cr-utility-page--account .cr-email-auth-shell .email-auth-links a {
    color: var(--cr-ea-link);
    font-family: inherit;
}
.cr-utility-page--account .cr-email-auth-sender {
    border: 0;
    color: var(--cr-ea-muted);
    font-size: .82rem;
    line-height: 1.6;
    margin: 0 0 24px;
    overflow-wrap: anywhere;
    padding: 0;
}
.cr-utility-page--account .cr-email-auth-shell .email-auth-message:has(+ .cr-email-auth-sender) { margin-bottom: 12px; }
.cr-email-auth-shell [data-cr-email-auth-sender-template] { display: none !important; }
.cr-utility-page--account .cr-email-auth-sender p { margin: 0 0 8px; }
.cr-utility-page--account .cr-email-auth-sender p:last-child { margin-bottom: 0; }
.cr-utility-page--account .cr-email-auth-sender strong { font-weight: 700; }
html[data-cr-theme="dark"] .cr-utility-page--account .cr-email-auth-shell {
    --cr-ea-field-bg: #162437;
    --cr-ea-field-border: #d5e3ee;
    --cr-ea-text: #edf4ff;
    --cr-ea-muted: #b7c7db;
    --cr-ea-link: #ff8a61;
    --cr-ea-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3E%3Crect width='30' height='30' rx='5' fill='%23202e41'/%3E%3Cg fill='none' stroke='%239db4d2' stroke-width='1.6'%3E%3Ccircle cx='15' cy='11' r='4'/%3E%3Cpath d='M8 24v-2a7 7 0 0 1 14 0v2M11 17a4 4 0 0 0 8 0'/%3E%3C/g%3E%3C/svg%3E");
}
html[data-cr-theme="dark"] .cr-utility-page--account .cr-email-auth-shell .email-auth-card h1,
html[data-cr-theme="dark"] .cr-utility-page--account .cr-email-auth-shell .email-auth-card label { color: #edf4ff; }
html[data-cr-theme="dark"] .cr-utility-page--account .cr-email-auth-shell .email-auth-card {
    --cr-ea-text: #edf4ff;
    --cr-ea-muted: #b7c7db;
    --cr-ea-link: #ff8a61;
}
@media (max-width: 767px) {
    .cr-utility-page--account .cr-email-auth-shell { padding: 0 var(--e-global-size-4, 30px) var(--e-global-size-4, 30px); }
}
@media (max-width: 370px) {
    .cr-utility-page--account .cr-email-auth-shell { padding: 0 var(--e-global-size-5, 20px) var(--e-global-size-4, 30px); }
}

/* Staff access remains available directly through wp-admin. */
.email-auth-links a[href*="email_auth_standard=1"],
.email-auth-links a[href*="action=lostpassword"],
.email-auth-links a[href*="/lost-password/"] { display: none !important; }

/* Solid, visible edges across sign-in, registration and native auth shells. */
:is(.cr-utility-page--account,.email-auth-page) { --cr-auth-border: #64748b; }
html[data-cr-theme="dark"] :is(.cr-utility-page--account,.email-auth-page) { --cr-auth-border: #94a3b8; }
@media(prefers-color-scheme:dark) {
    html:not([data-cr-theme="light"]) :is(.cr-utility-page--account,.email-auth-page) { --cr-auth-border: #94a3b8; }
}
:is(.cr-utility-page--account,.email-auth-page) .email-auth-card input:not([type=hidden]):not([type=checkbox]):not([type=radio]):not([type=submit]):not([type=button]),
body .cr-utility-page--account .listivo-input-v2,
body .cr-utility-page--account .listivo-login-form__checkbox.listivo-checkbox {
    border: 1px solid var(--cr-auth-border, #64748b) !important;
}
:is(html[data-cr-theme="dark"],body[data-cr-theme="dark"]) .cr-utility-page.cr-utility-page--account .listivo-login-form__field.listivo-input-v2,
:is(html[data-cr-theme="dark"],body[data-cr-theme="dark"]) .cr-utility-page.cr-utility-page--account .listivo-login-form__checkbox.listivo-checkbox {
    border: 1px solid var(--cr-auth-border, #94a3b8) !important;
}
:is(.cr-utility-page--account,.email-auth-page) .email-auth-card input[type=checkbox] {
    appearance: none !important;
    display: inline-grid;
    place-content: center;
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    padding: 0;
    border: 1px solid var(--cr-auth-border, #64748b) !important;
    border-radius: 3px;
    background: var(--cr-ea-bg, #fff);
    cursor: pointer;
}
:is(.cr-utility-page--account,.email-auth-page) .email-auth-card input[type=checkbox]:checked {
    background-color: #2054be;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6 5 8.5 9.5 3.5' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-position: center;
    background-size: 12px 12px;
    background-repeat: no-repeat;
}
:is(.cr-utility-page--account,.email-auth-page) .email-auth-card input[type=checkbox]::before,
:is(.cr-utility-page--account,.email-auth-page) .email-auth-card input[type=checkbox]::after {
    content: none !important;
    display: none !important;
}
:is(.cr-utility-page--account,.email-auth-page) .email-auth-card input:focus-visible {
    outline: 3px solid #206bad;
    outline-offset: 3px;
}
@media(forced-colors:active) {
    :is(.cr-utility-page--account,.email-auth-page) .email-auth-card input[type=checkbox] { appearance: auto !important; }
}
.cr-email-auth-sender-address { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; vertical-align: middle; }
.cr-email-auth-sender-address strong { font-weight: 700; white-space: nowrap; overflow-wrap: normal; }
:is(.cr-utility-page,.email-auth-page) .email-auth-card button.cr-email-auth-copy {
    display: inline-flex; align-items: center; justify-content: center; flex: 0 0 28px;
    width: 28px !important; min-height: 28px; height: 28px !important; margin: 0; padding: 4px !important;
    border: 0; border-radius: 3px; background: transparent !important; color: inherit; line-height: 1; cursor: pointer;
}
.cr-email-auth-copy svg { display: block; width: 18px; height: 18px; flex: none; }
.cr-email-auth-copy:hover { outline: 1px solid currentColor; }
.auth-copy-status { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
