/* =====================================================================
   auth-widget.css — header sign-in / sign-out widget (Phase 4.1)
   =====================================================================
   Scoped under #auth-widget to avoid colliding with any global class.
   Does NOT touch style.css (locked).
   ===================================================================== */

#auth-widget {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  padding: 8px 0 12px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 13px;
  min-height: 32px;
}

#auth-widget .aw-user {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

#auth-widget .aw-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid #e5e7eb;
  object-fit: cover;
}

#auth-widget .aw-name {
  color: #374151;
  font-weight: 500;
}

#auth-widget .aw-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

#auth-widget .aw-btn--primary {
  background: #fff;
  border-color: #d1d5db;
  color: #1f2937;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

#auth-widget .aw-btn--primary:hover {
  background: #f9fafb;
  border-color: #9ca3af;
}

#auth-widget .aw-btn--ghost {
  background: transparent;
  color: #6b7280;
  padding: 4px 8px;
  font-weight: 400;
}

#auth-widget .aw-btn--ghost:hover {
  color: #1f2937;
  background: #f3f4f6;
}

#auth-widget .aw-google {
  flex-shrink: 0;
}

#auth-widget .aw-hint {
  color: #9ca3af;
  font-size: 12px;
}

/* Sync indicator dot (Phase 4.6) */
#auth-widget .aw-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981; /* idle = green */
  transition: background 0.25s ease;
  cursor: help;
  flex-shrink: 0;
}
#auth-widget .aw-dot[data-state="syncing"] {
  background: #f59e0b; /* amber */
  animation: aw-pulse 1s ease-in-out infinite;
}
#auth-widget .aw-dot[data-state="pulled"] {
  background: #3b82f6; /* blue flash */
  animation: aw-flash 0.6s ease-out;
}
#auth-widget .aw-dot[data-state="error"] {
  background: #ef4444; /* red */
}

@keyframes aw-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.5; transform: scale(1.3); }
}
@keyframes aw-flash {
  0%   { transform: scale(2); opacity: 0.6; }
  100% { transform: scale(1); opacity: 1; }
}

@media (max-width: 640px) {
  #auth-widget .aw-hint { display: none; }
  #auth-widget .aw-name { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
