/* Shared styling for `_header_auth_menu.html` — the gateka-core connexion
 * button + signed-in avatar pill + dropdown.
 *
 * Sites include this once (e.g. via the shared assets URL) and theme it
 * with `--gk-*` custom properties on any ancestor (`:root` usually):
 *
 *   :root {
 *     --gk-accent: #4c78ff;          -- primary button background
 *     --gk-accent-hover: #3e66e0;    -- :hover tone
 *     --gk-accent-glow: rgba(76,120,255,.35);
 *     --gk-text: #0f172a;
 *     --gk-text-muted: #64748b;
 *     --gk-bg: #ffffff;
 *     --gk-bg-surface: #f1f5f9;
 *     --gk-border: #e2e8f0;
 *   }
 *
 * Any var left unset falls back to the defaults below so the button
 * still renders on a site that hasn't themed it yet. Identical DOM to
 * elen / stealth / artsiderz — single source of truth from now on.
 */

.header-auth {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px; border-radius: 999px;
  font-size: 0.95rem; font-weight: 700; font-family: inherit;
  letter-spacing: 0.3px; cursor: pointer; border: none;
  text-decoration: none; line-height: 1;
  transition: background .15s, color .15s, box-shadow .15s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.header-auth--out { background: var(--gk-accent, #4c78ff); color: #fff; }
.header-auth--out:hover {
  background: var(--gk-accent-hover, #3e66e0);
  box-shadow: 0 4px 14px var(--gk-accent-glow, rgba(76,120,255,.35));
}
.header-auth--out svg { transition: transform .15s; }
.header-auth--out:hover svg { transform: translateX(3px); }

.header-auth--in {
  padding: 4px 6px 4px 4px; gap: 4px;
  background: var(--gk-bg-surface, #f1f5f9);
  color: var(--gk-text, #0f172a);
  border: 1px solid var(--gk-border, #e2e8f0);
  box-shadow: none; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.header-auth--in:hover { border-color: var(--gk-text-muted, #64748b); }

.header-auth-user {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 2px 10px 2px 2px; border-radius: 999px;
  color: inherit; text-decoration: none; transition: background .15s;
}
.header-auth-user:hover { background: var(--gk-border, #e2e8f0); }

.header-auth-avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--gk-accent, #4c78ff); color: #fff;
  font-size: 0.75rem; font-weight: 800; letter-spacing: 0.3px;
  overflow: hidden; flex: none;
}
.header-auth-avatar--img { padding: 0; background: var(--gk-bg-surface, #f1f5f9); }
.header-auth-avatar--img img { width: 100%; height: 100%; object-fit: cover; display: block; }

.header-auth-name { font-size: 0.9rem; font-weight: 700; color: var(--gk-text, #0f172a); }

.header-auth-logout {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%;
  color: var(--gk-text-muted, #64748b); text-decoration: none;
  transition: background .15s, color .15s;
}
.header-auth-logout:hover { background: rgba(239,68,68,.12); color: #dc2626; }

.header-auth-wrap { position: relative; }
.header-auth-chev { color: var(--gk-text-muted, #64748b); transition: transform .15s; margin: 0 4px 0 2px; }
.header-auth-wrap.is-open .header-auth-chev { transform: rotate(180deg); }

.header-auth-menu {
  position: absolute; top: calc(100% + 10px); right: 0;
  min-width: 240px; padding: 8px;
  background: var(--gk-bg, #ffffff);
  border: 1px solid var(--gk-border, #e2e8f0);
  border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.15);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .15s, visibility .15s, transform .15s; z-index: 1050;
}
.header-auth-wrap.is-open .header-auth-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.header-auth-menu-head { padding: 10px 12px 12px; border-bottom: 1px solid var(--gk-border, #e2e8f0); margin-bottom: 6px; }
.header-auth-menu-name { font-size: 0.95rem; font-weight: 700; color: var(--gk-text, #0f172a); }
.header-auth-menu-email { font-size: 0.82rem; color: var(--gk-text-muted, #64748b); margin-top: 2px; word-break: break-all; }
.header-auth-menu-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 8px;
  font-size: 0.9rem; font-weight: 600; color: var(--gk-text, #0f172a);
  text-decoration: none; transition: background .15s, color .15s;
}
.header-auth-menu-item:hover { background: var(--gk-bg-surface, #f1f5f9); color: var(--gk-accent, #4c78ff); }

@media (max-width: 768px) {
  .header-auth-name { display: none; }
  .header-auth--out { padding: 7px 12px; }
}
