/*
 * open-banking.io theme for the Upptime status page.
 *
 * Colors, radii, and typography mirror src/web/src/theme/design.css in the
 * open-banking-io repository. Light by default; dark follows the OS color
 * scheme, like the main site's "auto" color scheme.
 *
 * Served from the site root (assets/ is copied as-is):
 *   https://status.open-banking.io/open-banking.css
 */

/* Self-hosted Inter (variable, 300–900). open-banking.io serves these subsets
   from /fonts with a strict CSP, so they cannot be hotlinked from here. */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url('inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url('inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Light (default) — mirrors the open-banking.io light tokens */
:root {
  --body-background-color: #f6f8fc;
  --body-text-color: #0f172a;
  --card-background-color: #ffffff;
  --card-border-color: rgba(15, 23, 42, 0.10);
  --nav-background-color: rgba(255, 255, 255, 0.85);
  --nav-border-bottom-color: rgba(15, 23, 42, 0.10);
  --nav-current-border-bottom-color: #3b82f6;
  --up-border-left-color: #10b981;
  --up-color-color: #0f172a;
  --degraded-border-left-color: #f59e0b;
  --degraded-color-color: #0f172a;
  --down-border-left-color: #dc2626;
  --down-color-color: #b42318;
  --down-background-color: #fee2e2;
  --tag-color: #ffffff;
  --tag-up-background-color: #10b981;
  --tag-down-background-color: #dc2626;
  --tag-degraded-background-color: #f59e0b;
  --change-background-color: rgba(59, 130, 246, 0.14);
  --error-button-border-color: #3b82f6;
  --error-button-background-color: #3b82f6;
  --error-button-color: #ffffff;
  --submit-button-border-color: #3b82f6;
  --submit-button-background-color: #3b82f6;
  --submit-button-color: #ffffff;
  --code-color: #0f172a;
  --code-background-color: #eef2f9;
  --graph-opacity: 1;
  --graph-filter: none;

  /* Extra tokens used by the polish rules below */
  --ob-accent: #3b82f6;
  --ob-text-secondary: #475569;
  --ob-card-hover: #eef2f9;
  --ob-shadow-card: 0 1px 2px rgba(15, 23, 42, 0.06), 0 4px 12px rgba(15, 23, 42, 0.05);
  --ob-shadow-card-hover: 0 4px 12px rgba(15, 23, 42, 0.08), 0 8px 30px rgba(15, 23, 42, 0.10);
  --ob-gradient-text: linear-gradient(135deg, #60a5fa, #22d3ee);
}

/* Dark override — mirrors the open-banking.io dark tokens */
@media (prefers-color-scheme: dark) {
  :root {
    --body-background-color: #0a0e1a;
    --body-text-color: #f1f5f9;
    --card-background-color: #1a1f35;
    --card-border-color: rgba(255, 255, 255, 0.06);
    --nav-background-color: rgba(10, 14, 26, 0.85);
    --nav-border-bottom-color: rgba(255, 255, 255, 0.06);
    --nav-current-border-bottom-color: #3b82f6;
    --up-color-color: #f1f5f9;
    --degraded-color-color: #f1f5f9;
    --down-border-left-color: #ef4444;
    --down-color-color: #fca5a5;
    --down-background-color: rgba(239, 68, 68, 0.10);
    --tag-down-background-color: #ef4444;
    --code-color: #e2e8f0;
    --code-background-color: #111827;
    --ob-text-secondary: #aab6c6;
    --ob-card-hover: #222845;
    --ob-shadow-card: 0 1px 2px rgba(0, 0, 0, 0.30), 0 4px 12px rgba(0, 0, 0, 0.25);
    --ob-shadow-card-hover: 0 4px 12px rgba(0, 0, 0, 0.40), 0 8px 30px rgba(0, 0, 0, 0.45);
  }
}

/* Typography — the status page's global.css loads after this file, so these
   selectors are bumped one element above the ones they override. */
html body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body h1,
body h2,
body h3,
body h4,
body h5,
body h6 {
  font-weight: 700;
  letter-spacing: -0.02em;
}
body header p.lead {
  color: var(--ob-text-secondary);
}

/* Intro title with the site's gradient text treatment */
body header h1 {
  background: var(--ob-gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Cards: 12px radius, hairline border, soft shadow; lift on hover */
body article {
  border-radius: 12px;
  box-shadow: var(--ob-shadow-card);
  transition: box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1),
    background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
body article.link:hover {
  background-color: var(--ob-card-hover);
  box-shadow: var(--ob-shadow-card-hover);
}

/* Layout width matches the main site's container */
body .container {
  max-width: 1200px;
  padding: 0 24px;
}

/* Nav: translucent, blurred, sticky — like the site's glass nav */
body nav {
  position: sticky;
  top: 0;
  z-index: 100;
  -webkit-backdrop-filter: blur(12px) saturate(1.4);
  backdrop-filter: blur(12px) saturate(1.4);
}
body nav,
body nav ul {
  color: var(--ob-text-secondary);
}
body nav ul li a {
  font-weight: 500;
  transition: color 150ms cubic-bezier(0.4, 0, 0.2, 1);
}
body nav ul li a:hover {
  color: var(--body-text-color);
}
body nav [aria-current='page'] {
  color: var(--ob-accent);
}
/* The logo is a horizontal wordmark: smaller than the default square icon,
   and no rounded corners. !important to beat the scoped component style. */
body .logo img {
  height: 2rem !important;
  border-radius: 0 !important;
}

/* Status tags and buttons: pill-shaped */
body .tag {
  border-radius: 9999px;
  font-weight: 600;
  padding: 0.3rem 0.75rem;
}
body .submit-button,
body a.error-button {
  border-radius: 9999px;
  font-weight: 600;
}
body .submit-button:hover,
body a.error-button:hover {
  filter: brightness(1.08);
}

/* Time-range switcher labels */
body .f .r label {
  cursor: pointer;
  transition: color 150ms cubic-bezier(0.4, 0, 0.2, 1);
}
body .f .r label:hover {
  color: var(--ob-accent);
}
