/**
 * Continue with Google (BFR-1646).
 *
 * Only the frame around the button is ours. Google draws the button itself
 * inside an iframe, so its wording, typeface and inner spacing cannot be
 * restyled from here — what follows is the divider, the width and the
 * message area.
 *
 * Plain CSS rather than SCSS: this ships with the plugin and is enqueued
 * directly, so there is no build step in the way of a change reaching the
 * three surfaces that use it.
 */

.BfGoogleSignIn {
    margin: 20px 0 0;
    width: 100%;
}

/* The "Or" rule from the design: a centred label with a line either side. */
.BfGoogleSignIn__divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 16px;
    color: #6b6b6b;
    font-size: 13px;
    text-transform: lowercase;
}

.BfGoogleSignIn__divider::before,
.BfGoogleSignIn__divider::after {
    content: '';
    flex: 1 1 auto;
    height: 1px;
    background: #d9d9d9;
}

/*
 * The button is ours, not Google's.
 *
 * Google's rendered button draws in an iframe where the wording is one of four
 * fixed values, so the design's "SIGN IN WITH GOOGLE" cannot be done with it.
 * In the header dropdown this element borrows BfHeader__button so it sits
 * identically to SIGN IN and REGISTER; everywhere else it is styled here.
 */
.BfGoogleSignIn__cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
}

/*
 * In the header dropdown the label has to hold one line, as the design shows.
 * The panel is 250px, the button 210, and SIGN IN WITH GOOGLE is the longest
 * label in it — at the inherited 13.3px with 20px side padding it overflowed
 * by 14px and wrapped, which also made the button half as tall again as the
 * REGISTER above it. Narrower padding and a slightly smaller label fit it,
 * and nowrap keeps it honest if the wording is ever translated longer.
 */
#CabinetDropdown__list .BfGoogleSignIn__cta,
.BfHeader__simpleDropdown .BfGoogleSignIn__cta {
    gap: 8px;
    padding: 6px 10px !important;
    font-size: 12px;
    white-space: nowrap;
    /*
     * Matches REGISTER exactly: that button is 34px tall, which is 12px of
     * padding, 2px of border and a 20px content box. The smaller label would
     * otherwise leave this one 2px shorter and visibly out of line with the
     * two buttons above it.
     */
    line-height: 20px;
}

.BfHeader__simpleDropdown .BfGoogleSignIn__logo {
    width: 16px;
    height: 16px;
}

/*
 * No top margin in the dropdown. The panel's body is a flex column with a
 * 22px gap, so the 20px above was added to a gap that was already there and
 * left SIGN IN floating 42px above the "or" — twice the distance between the
 * buttons it sits under.
 */
.BfHeader__simpleDropdown .BfGoogleSignIn {
    margin-top: 0;
}

/* The rule either side of "or" is a separator, not a heading; it does not
   need the 16px that the standalone button below it wants. */
.BfHeader__simpleDropdown .BfGoogleSignIn__divider {
    margin-bottom: 10px;
}

.BfGoogleSignIn__cta--standalone {
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
    padding: 12px 20px;
    background: #fff;
    border: 1px solid #1d1d1b;
    border-radius: 40px;        /* the pill in the desktop mock */
    color: #1d1d1b;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1.2;
}

.BfGoogleSignIn__cta--standalone:hover {
    background: #f5f5f5;
}

.BfGoogleSignIn__cta:disabled {
    cursor: default;
    opacity: 0.6;
}

/* Fixed brand colours — the mark is not ours to theme or scale oddly. */
.BfGoogleSignIn__logo {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.BfGoogleSignIn.is-busy {
    opacity: 0.6;
    pointer-events: none;
}

/*
 * BFR-1649. Small print, matching how the welcome banner and popup state the
 * same thing. Deliberately a notice and not a checkbox: the register form's
 * checkbox carries terms *and* marketing in one control, and choosing Google
 * must not subscribe anybody to marketing.
 */
.BfGoogleSignIn__consent {
    margin: 10px 0 0;
    font-size: 11px;
    line-height: 1.4;
    text-align: center;
    color: #6b6b6b;
}

.BfGoogleSignIn__consent a {
    color: inherit;
    text-decoration: underline;
}

/* The dropdown is 250px wide; the notice has to stay readable in it. */
.BfHeader__simpleDropdown .BfGoogleSignIn__consent {
    font-size: 10px;
    padding: 0 2px;
}
