﻿/*
 * OVW Connect — brand colour overrides & custom styles.
 *
 * FlyonUI uses CSS custom properties for theming. We override
 * the primary and secondary colours here for the light theme.
 *
 * Colour audit (WCAG 2.1 AA):
 *   #79B2E1 on white → contrast ~2.8:1 — insufficient for text.
 *     Use only for backgrounds, borders, icons, focus rings.
 *   #4a7fad (darkened) on white → ~4.6:1 — passes for text.
 *   #7B6A58 on white → contrast ~4.7:1 — passes for text.
 */

/*
 * Inter — the typeface FlyonUI's compiled CSS expects (--font-sans: 'Inter').
 * The reference dashboard loads it from Google Fonts; we self-host the variable
 * font instead to avoid the third-party request (AVG/GDPR). Inter is licensed
 * under the SIL Open Font License, so bundling it with the plugin is permitted.
 * Without this @font-face all Connect text falls back to a system font, which
 * visibly breaks the intended FlyonUI typography.
 */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/Inter-Variable.woff2') format('woff2');
}

[data-theme='light'],
:root {
  /* Primary: OVW blue — used for backgrounds/accents, not body text. */
  --color-primary: oklch(from #79B2E1 l c h);
  --color-primary-content: oklch(from #ffffff l c h);

  /* Secondary: OVW brown — sufficient contrast for text use. */
  --color-secondary: oklch(from #7B6A58 l c h);
  --color-secondary-content: oklch(from #ffffff l c h);
}

/* ---- Connect-specific layout -------------------------------------------- */

.lff-connect-app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Auth pages: centred single-column card */
.lff-auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-base-200);
  padding: 1.5rem;
}

.lff-auth-card {
  width: 100%;
  max-width: 28rem;
}

/* Error / notice banners */
.lff-notice {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-box, 0.5rem);
  margin-bottom: 1rem;
  font-size: 0.875rem;
}
.lff-notice--error {
  background-color: var(--color-error-content, #fce4e4);
  color: var(--color-error, #c0392b);
  border: 1px solid var(--color-error, #c0392b);
}
.lff-notice--success {
  background-color: var(--color-success-content, #e4fce4);
  color: var(--color-success, #27ae60);
  border: 1px solid var(--color-success, #27ae60);
}

/* Membership status badge */
.lff-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}
.lff-status-badge--active    { background: #d1fae5; color: #065f46; }
.lff-status-badge--inactive  { background: #fef9c3; color: #854d0e; }
.lff-status-badge--expired   { background: #fee2e2; color: #991b1b; }
.lff-status-badge--deactivated { background: #f3f4f6; color: #374151; }

/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/*
 * NOTE: Utility classes are no longer hand-added here. flyonui.css is now
 * rebuilt from our own templates (tools/flyonui-build) so every utility we use
 * is generated. After changing Connect markup, run: cd tools/flyonui-build &&
 * npm run build. See memory: flyonui-css-reality.
 */
