/* Sign in with Apple / Google (src/views/social_buttons.php), both at least 44px tall with a visible focus ring.
   Apple's follows Apple's Human Interface Guidelines: black with white text on light pages, white with black text in
   dark mode, the Apple logo, "Sign in with Apple". Google's follows Google's branding guidelines: the full-colour "G",
   white with a #747775 outline and #1F1F1F text on light pages, #131314 with a #8E918F outline and #E3E3E3 text in
   dark mode, "Sign in with Google". */
.social-signin { display: grid; gap: 12px; margin-top: 18px; }
/* "Continue with…" above a save or sign-up form: full width, then "or use your phone number" */
.social-signin.is-flow { margin: 22px 0 6px; gap: 12px; }
.social-signin.is-flow .social-buttons { justify-items: stretch; }
.social-signin.is-flow .siwa-btn, .social-signin.is-flow .siwg-btn { max-width: none; min-height: 52px; font-size: 1rem; }
.social-or-below { text-transform: none; }
.social-or { display: flex; align-items: center; gap: 12px; margin: 0; font-size: 0.85rem; font-weight: 700; color: var(--muted); text-transform: lowercase; }
.social-or::before, .social-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.social-buttons { display: grid; gap: 10px; justify-items: center; }
.siwa-btn, .siwg-btn { width: 100%; max-width: 400px; }
.siwa-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: 999px;
    font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 1rem; font-weight: 500; letter-spacing: -0.01em;
    color: #fff; background: #000; border: 1px solid #000; text-decoration: none; }
.siwa-btn:hover { background: #1d1d1f; }
.siwa-btn:focus-visible { outline: 3px solid var(--accent, #15803d); outline-offset: 3px; }
.siwa-logo { flex: none; margin-top: -2px; }
.siwg-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; padding: 0 20px; border-radius: 999px;
    font-family: Roboto, Arial, "Helvetica Neue", sans-serif; font-size: 0.95rem; font-weight: 500; letter-spacing: 0.01em;
    color: #1f1f1f; background: #fff; border: 1px solid #747775; text-decoration: none; }
.siwg-btn:hover { background: #f2f2f2; }
.siwg-btn:focus-visible { outline: 3px solid var(--accent, #15803d); outline-offset: 3px; }
.siwg-logo { flex: none; }
.social-note { margin: 0; font-size: 0.85rem; line-height: 1.45; color: var(--muted); text-align: center; }
.social-notice, .social-status { margin: 0; font-size: 0.92rem; line-height: 1.45; text-align: center; color: var(--ink-2, var(--ink)); }
.social-status[hidden], .social-confirm[hidden] { display: none; }
.social-confirm { display: grid; gap: 6px; justify-self: center; width: 100%; max-width: 400px; }
.social-confirm label { font-size: 0.85rem; font-weight: 800; color: var(--ink-2, var(--ink)); }
.social-confirm-row { display: flex; gap: 8px; }
.social-confirm-row input { flex: 1; min-width: 0; min-height: 44px; padding: 10px 14px; font: inherit; font-size: 1.05rem; letter-spacing: 0.2em; color: var(--ink);
    background: var(--surface); border: 1.5px solid var(--line-strong, var(--line)); border-radius: 14px; }
.social-confirm-row input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.social-confirm-row .btn { min-height: 44px; }

/* Dark mode: Apple's white button, Google's dark one */
:root[data-theme="dark"] .siwa-btn { color: #000; background: #fff; border-color: #fff; }
:root[data-theme="dark"] .siwa-btn:hover { background: #f2f2f7; }
:root[data-theme="dark"] .siwg-btn { color: #e3e3e3; background: #131314; border-color: #8e918f; }
:root[data-theme="dark"] .siwg-btn:hover { background: #1f1f20; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .siwa-btn { color: #000; background: #fff; border-color: #fff; }
    :root:not([data-theme="light"]) .siwa-btn:hover { background: #f2f2f7; }
    :root:not([data-theme="light"]) .siwg-btn { color: #e3e3e3; background: #131314; border-color: #8e918f; }
    :root:not([data-theme="light"]) .siwg-btn:hover { background: #1f1f20; }
}

/* Profile → Sign-in methods */
.signin-methods { display: grid; gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; }
.signin-methods li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; min-height: 44px; padding: 10px 14px;
    background: var(--surface-2); border-radius: 12px; }
.signin-methods b { display: block; }
.signin-methods small { color: var(--muted); overflow-wrap: anywhere; }
.signin-methods form { margin: 0; }
.signin-methods .btn { min-height: 44px; }
.signin-link { margin-top: 14px; }

/* The page Apple's sign-in comes back to for a moment */
.siwa-continue { display: grid; place-items: center; min-height: 100vh; margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: #111; background: #fff; }
.siwa-continue a { color: #0b5394; }
