/* Acceso social: Google como botón principal (guía de marca de Google) y Microsoft, Apple, LinkedIn y Facebook en una
   fila de mosaicos con su logo original. Todo dentro de la tarjeta de acceso. */
.oauth-block { display: grid; gap: 10px; }
.oauth-primary, .oauth-tile { font: inherit; cursor: pointer; text-decoration: none; -webkit-tap-highlight-color: transparent;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease, background-color .15s ease; }
.oauth-primary:hover, .oauth-tile:hover { text-decoration: none; transform: translateY(-1px); }
.oauth-primary:active, .oauth-tile:active { transform: translateY(0) scale(.985); }
.oauth-primary:focus-visible, .oauth-tile:focus-visible { outline: 3px solid #c41230; outline-offset: 2px; }
.oauth-ic { display: grid; place-items: center; flex: none; }

/* Google: blanco con borde gris y su «G» de 4 colores */
.oauth-primary {
  display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; min-height: 52px; padding: 0 18px;
  border-radius: 14px; border: 1px solid #dadce0; background: #fff; color: #1f1f1f; font-weight: 700; font-size: 1rem; letter-spacing: .005em;
  box-shadow: 0 1px 2px rgba(21, 23, 27, .06);
}
.oauth-primary:hover { background: #f8faff; border-color: #c3d0ea; box-shadow: 0 10px 24px -14px rgba(21, 23, 27, .45); }
.oauth-primary .oauth-ic svg { width: 22px; height: 22px; }

.oauth-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.oauth-row[data-n="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.oauth-row[data-n="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.oauth-tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; width: 100%; min-height: 74px; padding: 10px 4px;
  border-radius: 14px; border: 1px solid var(--line, #e2e8f4); background: var(--surface, #fff); color: var(--ink, #15171c);
  box-shadow: 0 1px 2px rgba(21, 23, 27, .05);
}
.oauth-tile:hover { border-color: var(--accent-line, rgba(196, 18, 48, .35)); background: var(--surface-2, #f8faff); box-shadow: 0 10px 24px -14px rgba(21, 23, 27, .45); }
.oauth-tile .oauth-ic svg { width: 24px; height: 24px; }
.oauth-name { font-weight: 700; font-size: .76rem; line-height: 1.1; color: var(--ink-2, #26334f); }

.oauth-legal { font-size: .76rem; color: var(--muted, #5b6b8a); margin: 2px 0 0; text-align: center; line-height: 1.45; }
.oauth-or { display: flex; align-items: center; gap: 12px; margin: 8px 0 2px; color: var(--faint, #8a98b4); font-size: .78rem; font-weight: 600; }
.oauth-or::before, .oauth-or::after { content: ""; flex: 1; height: 1px; background: var(--line, #e2e8f4); }

/* Avisos de la página de acceso: error (rojo), listo (verde) e informativo (azul) */
.auth-notice { margin: 0; padding: 12px 14px; border-radius: 12px; font-size: .88rem; font-weight: 600; line-height: 1.45;
  background: rgba(220, 38, 38, .07); color: #b91c1c; border: 1px solid rgba(220, 38, 38, .28); }
.auth-notice.ok { background: rgba(5, 150, 105, .08); color: #047857; border-color: rgba(5, 150, 105, .32); }
.auth-notice.info { display: flex; gap: 10px; align-items: flex-start; background: var(--accent-soft, rgba(196, 18, 48, .1)); color: var(--ink-2, #26334f); border-color: var(--accent-line, rgba(196, 18, 48, .35)); font-weight: 500; }
.auth-notice.info[hidden] { display: none; }
.auth-notice.info::before { content: "i"; flex: none; display: grid; place-items: center; width: 20px; height: 20px; margin-top: 1px; border-radius: 50%;
  background: var(--accent, #c41230); color: #fff; font: 800 .74rem/1 var(--font, sans-serif); }
.auth-notice.info b { color: var(--ink, #15171c); }
.auth-notice.pop { animation: oauth-pop .35s ease; }
@keyframes oauth-pop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
/* El campo de correo «llama» la atención un momento cuando el proveedor aún no está activo */
.input.attn { animation: oauth-attn 1.4s ease 1; }
@keyframes oauth-attn { 0%, 100% { box-shadow: 0 0 0 0 rgba(196, 18, 48, 0); } 30% { box-shadow: 0 0 0 5px rgba(196, 18, 48, .3); border-color: #e3261c; } }

:root[data-theme="dark"] .auth-notice { color: #fca5a5; }
:root[data-theme="dark"] .auth-notice.ok { color: #6ee7b7; }
:root[data-theme="dark"] .auth-notice.info { color: var(--ink-2); }
/* Google en modo oscuro: su variante oficial oscura */
:root[data-theme="dark"] .oauth-primary { background: #131314; border-color: #8e918f; color: #e3e3e3; }
:root[data-theme="dark"] .oauth-primary:hover { background: #1c1c1e; border-color: #b4b7b5; }
:root[data-theme="dark"] .oauth-tile { background: rgba(255, 255, 255, .03); }
:root[data-theme="dark"] .oauth-tile:hover { background: rgba(255, 255, 255, .07); }

@media (max-width: 360px) { .oauth-row { gap: 8px; } .oauth-name { font-size: .7rem; } }
@media (prefers-reduced-motion: reduce) {
  .oauth-primary, .oauth-tile { transition: none; }
  .oauth-primary:hover, .oauth-tile:hover, .oauth-primary:active, .oauth-tile:active { transform: none; }
  .auth-notice.pop, .input.attn { animation: none; }
}

/* Clerk como acceso único: su formulario va dentro de la tarjeta de ODÍN. El formulario de correo anterior se oculta
   (solo reaparece con «¿Tenías contraseña de ODÍN?»), y el registro lo hace Clerk por completo. */
.clerk-block { display: grid; gap: 10px; }
.clerk-loading { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 120px; color: var(--muted, #5b6b8a); font-weight: 600; font-size: .9rem; }
.clerk-loading[hidden] { display: none; }
.clerk-spin { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid var(--line, #e2e8f4); border-top-color: var(--accent, #c41230); animation: clerk-spin .8s linear infinite; }
@keyframes clerk-spin { to { transform: rotate(360deg); } }
.clerk-legacy { justify-self: center; margin-top: 2px; padding: 6px 10px; border: 0; background: none; color: var(--accent, #c41230); font: inherit; font-size: .84rem; font-weight: 600; cursor: pointer; border-radius: 8px; }
.clerk-legacy:hover { text-decoration: underline; }
.clerk-legacy:focus-visible { outline: 3px solid #c41230; outline-offset: 2px; }
.auth-panel:has([data-clerk-mount]):not(.show-legacy) .auth-form { display: none; }
.auth-panel.show-legacy .auth-form { margin-top: 6px; padding-top: 14px; border-top: 1px solid var(--line, #e2e8f4); }
@media (prefers-reduced-motion: reduce) { .clerk-spin { animation-duration: 2.4s; } }
