/**
 * Member auth forms (login / register / account) + the two-option gate modal.
 * Palette mirrors the LIVE B&Company site (Consultex theme with a Customizer
 * override): cyan accent (#33c6e9) for actions/links, near-black ink for
 * headings, warm greys for borders/muted text. The theme's stock coral is NOT
 * used — the site recolors every accent to cyan. Tokens live on the component
 * roots so both the shortcode forms and the modal share one source of truth.
 */
.bc-member-auth,
.bc-gate-modal {
    --bc-accent: #33c6e9;
    --bc-accent-hover: #1fb0d3;
    --bc-accent-soft: rgba(51, 198, 233, 0.16);
    --bc-ink: #242424;
    --bc-muted: #6f6f70;
    --bc-border: #dcdbdb;
    --bc-surface: #ffffff;
    --bc-surface-alt: #f6f6f6;
    --bc-track: #eef0f2;
    --bc-danger: #b32d2e;
}

/* Standalone shortcode forms (login / register / account). */
.bc-member-auth {
    max-width: 420px;
    margin: 24px auto;
    color: var(--bc-ink);
}

.bc-member-auth__form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.bc-member-auth__field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.bc-member-auth__field label {
    font-size: 14px;
    font-weight: 600;
    color: var(--bc-ink);
}

.bc-member-auth__field input {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--bc-border);
    border-radius: 8px;
    font-size: 15px;
    color: var(--bc-ink);
    background: var(--bc-surface);
    box-sizing: border-box;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.bc-member-auth__field input::placeholder {
    color: #9a9a9a;
}

.bc-member-auth__field input:focus {
    outline: none;
    border-color: var(--bc-accent);
    box-shadow: 0 0 0 3px var(--bc-accent-soft);
}

.bc-member-auth__submit {
    padding: 13px 16px;
    background: var(--bc-accent);
    color: #fff;
    border: 0;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.2px;
    cursor: pointer;
    transition: background-color 0.18s ease, transform 0.05s ease;
}

.bc-member-auth__submit:hover {
    background: var(--bc-accent-hover);
}

.bc-member-auth__submit:active {
    transform: translateY(1px);
}

.bc-member-auth__submit:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--bc-accent-soft);
}

.bc-member-auth__error {
    color: var(--bc-danger);
    font-size: 13px;
}

.bc-member-auth__welcome {
    font-weight: 600;
    text-align: center;
}

/* Two-option gate modal. */
.bc-gate-modal[hidden] {
    display: none;
}

.bc-gate-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bc-ink);
}

.bc-gate-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(24, 24, 24, 0.58);
    backdrop-filter: blur(2px);
}

.bc-gate-modal__dialog {
    position: relative;
    background: var(--bc-surface);
    border-radius: 14px;
    max-width: 760px;
    width: calc(100% - 32px);
    max-height: 90vh;
    overflow: auto;
    padding: 32px;
    box-shadow: 0 24px 60px rgba(24, 24, 24, 0.28);
    animation: bc-gate-in 0.22s ease;
}

@keyframes bc-gate-in {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.bc-gate-modal__close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 0;
    border-radius: 8px;
    font-size: 26px;
    line-height: 1;
    color: var(--bc-muted);
    cursor: pointer;
    transition: background-color 0.18s ease, color 0.18s ease;
}

.bc-gate-modal__close:hover {
    background: var(--bc-surface-alt);
    color: var(--bc-ink);
}

.bc-gate-modal__panels {
    display: flex;
    gap: 32px;
}

.bc-gate-modal__panel {
    flex: 1 1 0;
    min-width: 0;
}

.bc-gate-modal__panel--login {
    border-left: 1px solid #e5e5e5;
    padding-left: 32px;
}

.bc-gate-modal__title {
    margin: 0 0 6px;
    font-size: 19px;
    font-weight: 700;
    color: var(--bc-ink);
}

.bc-gate-modal__title::after {
    content: "";
    display: block;
    width: 34px;
    height: 3px;
    margin-top: 8px;
    border-radius: 2px;
    background: var(--bc-accent);
}

/* Log in / Register segmented control inside the modal login panel. */
.bc-gate-modal__tabs {
    display: flex;
    gap: 4px;
    margin: 18px 0 18px;
    padding: 4px;
    background: var(--bc-track);
    border-radius: 10px;
}

.bc-gate-modal__tab {
    flex: 1 1 0;
    padding: 10px 12px;
    background: transparent;
    border: 0;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--bc-muted);
    cursor: pointer;
    transition: background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.bc-gate-modal__tab:hover {
    color: var(--bc-ink);
}

.bc-gate-modal__tab.is-active {
    background: var(--bc-surface);
    color: var(--bc-ink);
    font-weight: 700;
    box-shadow: 0 1px 3px rgba(24, 24, 24, 0.16);
}

.bc-gate-modal__tab:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--bc-accent-soft);
}

.bc-gate-auth-form[hidden],
.bc-gate-auth-forgot[hidden] {
    display: none;
}

/* Text link inside the login panel (Forgot password? / Back to login). */
.bc-gate-modal__link {
    display: inline-block;
    margin-top: 12px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--bc-accent);
    font-size: 14px;
    cursor: pointer;
}

.bc-gate-modal__link:hover {
    color: var(--bc-accent-hover);
    text-decoration: underline;
}

.bc-gate-modal__link:focus-visible {
    outline: none;
    text-decoration: underline;
    box-shadow: 0 0 0 3px var(--bc-accent-soft);
    border-radius: 4px;
}

/* Login form (report-request modal + gate-modal login panel) is capped so the
   fields stay readable on wide dialogs. */
.bc-login-form {
    max-width: 460px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

/* Auth modal (report-request page) — narrower single-panel login/register dialog. */
.bc-gate-modal__dialog--auth {
    max-width: 524px;
}

/* "Remember me" checkbox row (stores only the email, client-side). */
.bc-member-auth__remember {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 4px 0 14px;
    font-size: 14px;
    color: var(--bc-muted);
    cursor: pointer;
}

.bc-member-auth__remember input {
    -webkit-appearance: none;
    appearance: none;
    position: relative;
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin: 0;
    border: 1px solid var(--bc-border);
    border-radius: 4px;
    background: var(--bc-surface);
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

/* Checked state: fill with the accent + draw the check "mask" via a rotated
   border (no image asset, crisp at any zoom). */
.bc-member-auth__remember input:checked {
    background: var(--bc-accent);
    border-color: var(--bc-accent);
}

.bc-member-auth__remember input:checked::after {
    content: "";
    position: absolute;
    left: 6px;
    top: 2px;
    width: 4px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.bc-member-auth__remember input:focus-visible {
    outline: none;
    border-color: var(--bc-accent);
    box-shadow: 0 0 0 3px var(--bc-accent-soft);
}

/* Quick-contact panel inputs share the same field styling. */
.bc-gate-contact .bc-member-auth__field {
    margin-bottom: 10px;
}

.bc-gate-contact .bc-member-auth__field input {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--bc-border);
    border-radius: 8px;
    font-size: 15px;
    color: var(--bc-ink);
    background: var(--bc-surface);
    box-sizing: border-box;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.bc-gate-contact .bc-member-auth__field input:focus {
    outline: none;
    border-color: var(--bc-accent);
    box-shadow: 0 0 0 3px var(--bc-accent-soft);
}

.bc-gate-contact__error {
    color: var(--bc-danger);
    font-size: 13px;
    margin-bottom: 8px;
}

@media (max-width: 600px) {
    .bc-gate-modal__dialog {
        padding: 24px;
    }

    .bc-gate-modal__panels {
        flex-direction: column;
        gap: 24px;
    }

    .bc-gate-modal__panel--login {
        border-left: 0;
        border-top: 1px solid #e5e5e5;
        padding-left: 0;
        padding-top: 22px;
    }
}

/* Respect reduced-motion: drop the entrance animation and transitions. */
@media (prefers-reduced-motion: reduce) {
    .bc-gate-modal__dialog {
        animation: none;
    }

    .bc-member-auth__field input,
    .bc-gate-contact .bc-member-auth__field input,
    .bc-member-auth__submit,
    .bc-gate-modal__tab,
    .bc-gate-modal__close {
        transition: none;
    }
}
