/*
 * Sign in with Google / Sign in with Apple / Continue with Facebook buttons.
 *
 * Apple publishes appearance rules for its button and they are followed here:
 * the WHITE style (white background, black content - Apple's choice for dark
 * backgrounds, and every P2E auth surface is charcoal/navy; the black style
 * disappeared into the card), the Apple mark unaltered and uncoloured,
 * clear space around the mark, a minimum height of 44px, a title from Apple's
 * approved list, and a button no smaller or less prominent than the one beside
 * it. The two buttons are deliberately identical in size and weight - Apple
 * requires parity, and a Google button that shouts louder would fail it.
 *
 * Loaded only by resources/views/auth/partials/social-buttons.blade.php, which
 * renders nothing at all when no provider is configured.
 */

.social-auth {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.social-auth-btn {
    /* Both buttons share every dimension. Apple requires parity of prominence
       with any other sign-in button on the same screen. */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 44px;
    padding: 0 16px;
    border-radius: 8px;
    border: 1px solid transparent;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 17px;
    font-weight: 500;
    line-height: 1.2;
    text-decoration: none;
    transition: filter 0.15s ease, box-shadow 0.15s ease;
}

.social-auth-btn:hover,
.social-auth-btn:focus-visible {
    text-decoration: none;
    filter: brightness(0.94);
}

.social-auth-btn:focus-visible {
    /* Visible on the white buttons, the blue one and the dark card alike. */
    outline: 3px solid #00aeef;
    outline-offset: 3px;
}

.social-auth-mark {
    /* Apple's guidance puts the mark at roughly 43% of the button height and
       asks for clear space around it. Both marks are sized alike so neither
       provider's logo is visually favoured. */
    width: 19px;
    height: 19px;
    flex: 0 0 auto;
    object-fit: contain;
}

.social-auth-text {
    /* The title is never truncated or wrapped: Apple's approved strings have to
       appear in full. */
    white-space: nowrap;
}

/* ---- Apple: Apple's "white" style for dark backgrounds, unaltered mark. ---- */
.social-auth-btn-apple {
    background: #fff;
    color: #000;
    border-color: #fff;
}

.social-auth-btn-apple:hover,
.social-auth-btn-apple:focus-visible {
    color: #000;
}

.social-auth-btn-apple .social-auth-mark {
    /* The mark is the Apple logo in black, with no recolouring or effects. */
    color: #000;
    /* Optical centring: the logo's leaf sits high, so it needs a hair of lift
       to look level with the text rather than measure level with it. */
    margin-top: -1px;
}

/* ---- Google: white button, full-colour G, per Google's own guidance. ---- */
.social-auth-btn-google {
    background: #fff;
    color: #1f1f1f;
    /* Google light theme: 1px #747775 stroke (Identity branding guidelines). */
    border-color: #747775;
}

.social-auth-btn-google:hover,
.social-auth-btn-google:focus-visible {
    color: #1f1f1f;
    box-shadow: 0 1px 3px rgba(60, 64, 67, 0.3);
}

/* ---- Facebook: Facebook blue, white "f", per Meta's Login button. ---- */
.social-auth-btn-facebook {
    background: #1877f2;
    color: #fff;
    border-color: #1877f2;
}

.social-auth-btn-facebook:hover,
.social-auth-btn-facebook:focus-visible {
    color: #fff;
}

/*
 * Brand colours must win over the theme and the phone shell.
 *
 * On the login page <body> carries both `dark-scheme` and `p2e-mobile-auth`.
 * The AIvent theme's `.dark-scheme a, .dark-scheme a:hover` (specificity
 * 0,1,1) paints every anchor with `--body-font-color-dark`, so the Google
 * label came out near-white on a white pill; the phone shell's
 * `body.p2e-mobile-auth a { color:#39c9f1 !important }` (0,1,2) then turned
 * it cyan on white. The `!important` is therefore required - an !important
 * declaration can only be beaten by another one - and the selectors carry
 * enough specificity to out-rank the phone shell's rule as well.
 *
 * These are the ONLY !important declarations in this file. They are scoped
 * to the three brand buttons and their label, in the normal, hover and
 * focus-visible states, and cover nothing else on the page. The backgrounds
 * are left as they were: no theme rule sets them.
 */
body .social-auth .social-auth-btn-google,
body .social-auth .social-auth-btn-google:hover,
body .social-auth .social-auth-btn-google:focus-visible,
body .social-auth .social-auth-btn-google .social-auth-text {
    color: #1f1f1f !important;
}

body .social-auth .social-auth-btn-apple,
body .social-auth .social-auth-btn-apple:hover,
body .social-auth .social-auth-btn-apple:focus-visible,
body .social-auth .social-auth-btn-apple .social-auth-text,
body .social-auth .social-auth-btn-apple .social-auth-mark {
    color: #000 !important;
}

body .social-auth .social-auth-btn-facebook,
body .social-auth .social-auth-btn-facebook:hover,
body .social-auth .social-auth-btn-facebook:focus-visible,
body .social-auth .social-auth-btn-facebook .social-auth-text {
    color: #fff !important;
}

/* ---- "or use your email address" ---- */
.social-auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
    color: #8b93a1;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.social-auth-divider::before,
.social-auth-divider::after {
    content: "";
    flex: 1 1 auto;
    height: 1px;
    background: currentColor;
    opacity: 0.3;
}

/* ---- "Continuing as ... via Google" ---- */
.social-auth-continuing {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 20px;
    padding: 12px 14px;
    border: 1px solid rgba(0, 174, 239, 0.45);
    border-radius: 10px;
    background: rgba(0, 174, 239, 0.08);
    font-size: 14px;
    line-height: 1.45;
}

.social-auth-continuing-badge {
    flex: 0 0 auto;
    padding: 2px 8px;
    border-radius: 999px;
    background: #00aeef;
    color: #04121c;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
