/**
 * The sign-in and sign-up forms (BFR-1646).
 *
 * Written against the storefront's own vocabulary — black on white, uppercase
 * pill buttons — rather than against a theme variable set, because these
 * render in two places with different owners: the header popup (theme) and
 * /account/login/ (plugin view). Anything inherited from one would be missing
 * in the other.
 *
 * Every rule below is scoped under .BfAccountForm, and that is load-bearing
 * rather than tidiness. Elementor's kit stylesheet styles bare elements
 * through the body class — `.elementor-kit-55344 button`, which is one class
 * plus one type — so a plain `.BfAccountForm__submit` loses to it and the
 * black button renders as Elementor's white outline. Two classes win it back
 * without reaching for !important, which would only move the same fight to
 * whoever needs to override this next.
 */

.BfAccountForm {
    box-sizing: border-box;
    color: #000;
    font-size: 14px;
    line-height: 1.4;
    text-align: left;
    width: 100%;
}

.BfAccountForm *,
.BfAccountForm *::before,
.BfAccountForm *::after {
    box-sizing: inherit;
}

.BfAccountForm .BfAccountForm__title {
    color: #000;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.02em;
    margin: 0 0 4px;
    text-transform: uppercase;
}

.BfAccountForm .BfAccountForm__lead {
    color: #555;
    font-size: 13px;
    margin: 0 0 20px;
}

.BfAccountForm .BfAccountForm__form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.BfAccountForm .BfAccountForm__field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.BfAccountForm .BfAccountForm__label {
    color: #333;
    font-size: 12px;
    letter-spacing: 0.02em;
}

.BfAccountForm .BfAccountForm__control {
    position: relative;
}

.BfAccountForm .BfAccountForm__input {
    background: #fff;
    border: 1px solid #c9c9c9;
    border-radius: 2px;
    color: #000;
    font-family: inherit;
    /* 16px, because anything smaller makes iOS Safari zoom the page on focus
       — inside the header popup that leaves the panel half off screen. */
    font-size: 16px;
    height: auto;
    padding: 12px 42px 12px 14px;
    width: 100%;
}

.BfAccountForm .BfAccountForm__input:focus {
    border-color: #000;
    outline: none;
}

.BfAccountForm .BfAccountForm__input::placeholder {
    color: #9b9b9b;
}

/* The eye. Two shapes drawn in CSS: an icon font or an SVG would be one more
   asset to load for a control 24px across. */
.BfAccountForm .BfAccountForm__reveal {
    background: none;
    border: 0;
    border-radius: 0;
    cursor: pointer;
    height: 24px;
    min-height: 0;
    padding: 0;
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
}

.BfAccountForm .BfAccountForm__reveal::before {
    border: 1.5px solid #6b6b6b;
    border-radius: 50% 0;
    content: "";
    height: 13px;
    left: 5px;
    position: absolute;
    top: 5px;
    transform: rotate(45deg);
    width: 13px;
}

.BfAccountForm .BfAccountForm__reveal::after {
    background: #6b6b6b;
    border-radius: 50%;
    content: "";
    height: 5px;
    left: 9px;
    position: absolute;
    top: 9px;
    width: 5px;
}

.BfAccountForm .BfAccountForm__reveal.__shown::before {
    border-color: #000;
}

.BfAccountForm .BfAccountForm__reveal.__shown::after {
    background: #000;
}

/*
 * The password policy, under the field.
 *
 * bfusers.css already styles .bf-password-requirements for the account
 * pages — centred, 20px of margin either side — which is wrong directly
 * under a field and is not loaded at all on the pages the header popup
 * appears on. Restated here, scoped, rather than edited there: the three
 * screens that use the centred version still want it.
 */
.BfAccountForm .bf-password-requirements {
    color: #6b6b6b;
    font-size: 11px;
    line-height: 1.5;
    margin: 2px 0 0;
    text-align: left;
}

.BfAccountForm .bf-password-requirements__title {
    font-weight: 600;
    letter-spacing: 0.02em;
    margin-bottom: 2px;
}

.BfAccountForm .BfAccountForm__forgot {
    color: #000;
    font-size: 12px;
    margin-top: -6px;
    text-decoration: underline;
}

.BfAccountForm .BfAccountForm__error {
    background: #fdeeee;
    border-left: 3px solid #c0392b;
    color: #9b2c22;
    font-size: 13px;
    padding: 10px 12px;
}

.BfAccountForm .BfAccountForm__error[hidden] {
    display: none;
}

.BfAccountForm .BfAccountForm__submit {
    background: #000;
    border: 1px solid #000;
    border-radius: 20px;
    color: #fff;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.08em;
    min-height: 44px;
    padding: 12px 24px;
    text-transform: uppercase;
    width: 100%;
}

.BfAccountForm .BfAccountForm__submit:hover {
    background: #222;
    color: #fff;
}

/* Sending. The label stays put — swapping it for a spinner would resize the
   button mid-press — and the control stops accepting a second press, which is
   what actually prevents a double registration. */
.BfAccountForm .BfAccountForm__form.__busy .BfAccountForm__submit {
    opacity: 0.6;
    pointer-events: none;
}

.BfAccountForm .BfAccountForm__legal {
    color: #666;
    font-size: 11px;
    line-height: 1.5;
    margin: 0;
    text-align: center;
}

.BfAccountForm .BfAccountForm__legal a {
    color: #666;
    text-decoration: underline;
}

/**
 * /account/login/ — the two forms side by side, with Google underneath.
 *
 * One column until there is room for two. The breakpoint is the content's,
 * not a device's: below it the columns are narrower than the fields they hold.
 */
.BfAccountPage {
    margin: 0 auto;
    max-width: 920px;
    padding: 40px 20px 60px;
}

.BfAccountPage__forms {
    display: grid;
    gap: 40px;
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .BfAccountPage__forms {
        gap: 56px;
        grid-template-columns: 1fr 1fr;
    }

    /* The divider between the columns, drawn on the second one rather than as
       an element, so it cannot appear once they stack. */
    .BfAccountPage__forms > .BfAccountForm + .BfAccountForm {
        border-left: 1px solid #e3e3e3;
        padding-left: 56px;
    }
}

.BfAccountPage__google {
    margin: 36px auto 0;
    max-width: 360px;
}

.BfAccountPage__flashes {
    margin: 0 auto 28px;
    max-width: 560px;
}

.BfAccountPage__flash {
    background: #fdeeee;
    border-left: 3px solid #c0392b;
    color: #9b2c22;
    font-size: 14px;
    padding: 12px 14px;
}

/* BFR-1826: why the shopper is here ("Your email address has been verified.
   Please sign in to continue.") - confirmation, so black on a light tint, not the error red. */
.BfAccountPage__flash.__success {
    background: #f4f2ef;
    border-left-color: #010101;
    color: #010101;
}
