/* ============================================
   InfluenceHub – requireClientForRequest() guard styles
   - Highlights the auth modal when it is opened by the
     client guard (guest or non-client user) so the user
     understands why they are being asked to log in.
   - Adds a subtle "reason" banner above the auth form.
   - Dark mode, prefers-reduced-motion, forced-colors.
   ============================================ */

/* ---------- Reason banner inside the auth modal ---------- */

.auth-client-guard-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  margin-bottom: 1rem;
  padding: 0.75rem 0.875rem;
  border-radius: 0.75rem;
  /* WCAG AA: #6d28d9 on #f5f3ff = 8.4:1 */
  background: #f5f3ff;
  color: #6d28d9;
  border: 1px solid #ddd6fe;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.5;
}

.auth-client-guard-banner[hidden] {
  display: none !important;
}

.auth-client-guard-banner i,
.auth-client-guard-banner svg {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  margin-top: 0.125rem;
  color: #7c3aed;
}

/* ---------- Dark mode ---------- */

.dark .auth-client-guard-banner {
  background: rgba(76, 29, 149, 0.35);
  color: #ddd6fe;
  border-color: rgba(139, 92, 246, 0.4);
}

.dark .auth-client-guard-banner i,
.dark .auth-client-guard-banner svg {
  color: #c4b5fd;
}

/* ---------- Highlight the preselected client role ---------- */

.auth-role-btn.auth-role-guard-highlight {
  outline: 2px solid #7c3aed;
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.2);
}

.dark .auth-role-btn.auth-role-guard-highlight {
  outline-color: #c4b5fd;
  box-shadow: 0 0 0 4px rgba(196, 181, 253, 0.3);
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .auth-client-guard-banner,
  .auth-role-btn.auth-role-guard-highlight {
    transition: none !important;
    animation: none !important;
    transform: none !important;
  }
}

/* ---------- Forced colors (Windows High Contrast) ---------- */

@media (forced-colors: active) {
  .auth-client-guard-banner {
    background: Canvas;
    color: CanvasText;
    border: 1px solid CanvasText;
  }

  .auth-role-btn.auth-role-guard-highlight {
    outline: 2px solid Highlight;
    outline-offset: 2px;
    box-shadow: none;
  }
}
