/* Teknexus.Blazor.WebAssembly — reference from host index.html:
   <link href="_content/Teknexus.Blazor.WebAssembly/css/teknexus-blazor.css" rel="stylesheet" /> */

:root {
  --teknexus-font-sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --teknexus-color-text: #1a1a1a;
  --teknexus-color-muted: #5c5c5c;
  --teknexus-color-border: #e2e2e2;
  --teknexus-color-danger-bg: #fdecea;
  --teknexus-color-danger-border: #f5c2c0;
}

.teknexus-plain-layout {
  font-family: var(--teknexus-font-sans);
  color: var(--teknexus-color-text);
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.25rem 1rem;
}

.teknexus-error-boundary {
  font-family: var(--teknexus-font-sans);
  padding: 1rem 1.25rem;
  border: 1px solid var(--teknexus-color-danger-border);
  border-radius: 6px;
  background: var(--teknexus-color-danger-bg);
}

.teknexus-error-boundary__title {
  margin: 0 0 0.5rem;
  font-weight: 600;
  font-size: 1rem;
}

.teknexus-error-boundary__detail {
  margin: 0 0 1rem;
  font-size: 0.875rem;
  color: var(--teknexus-color-muted);
  word-break: break-word;
}

.teknexus-error-boundary__retry {
  font: inherit;
  padding: 0.35rem 0.75rem;
  border-radius: 4px;
  border: 1px solid var(--teknexus-color-border);
  background: #fff;
  cursor: pointer;
}

.teknexus-error-boundary__retry:hover {
  background: #f6f6f6;
}

.teknexus-toast-host {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1090;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: min(24rem, calc(100vw - 2rem));
  pointer-events: none;
}

.teknexus-toast-host .toast {
  pointer-events: auto;
  box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.12);
  overflow: hidden;
  border-left-width: 4px;
  border-left-style: solid;
}

.teknexus-toast__message {
  word-break: break-word;
}

.teknexus-toast--success {
  --bs-toast-bg: #d1e7dd;
  --bs-toast-border-color: #a3cfbb;
  --bs-toast-header-bg: #c3e6cb;
  --bs-toast-header-color: #0a3622;
  --bs-toast-color: #0a3622;
  background: #d1e7dd;
  border-left-color: #198754;
}

.teknexus-toast--success .toast-header,
.teknexus-toast--success .toast-body {
  background: transparent;
  color: #0a3622;
}

.teknexus-toast--warning {
  --bs-toast-bg: #fff3cd;
  --bs-toast-border-color: #ffe69c;
  --bs-toast-header-bg: #ffe69c;
  --bs-toast-header-color: #664d03;
  --bs-toast-color: #664d03;
  background: #fff3cd;
  border-left-color: #ffc107;
}

.teknexus-toast--warning .toast-header,
.teknexus-toast--warning .toast-body {
  background: transparent;
  color: #664d03;
}

.teknexus-toast--info {
  --bs-toast-bg: #cfe2ff;
  --bs-toast-border-color: #9ec5fe;
  --bs-toast-header-bg: #b6d4fe;
  --bs-toast-header-color: #084298;
  --bs-toast-color: #084298;
  background: #cfe2ff;
  border-left-color: #0d6efd;
}

.teknexus-toast--info .toast-header,
.teknexus-toast--info .toast-body {
  background: transparent;
  color: #084298;
}

.teknexus-toast--error {
  --bs-toast-bg: #f8d7da;
  --bs-toast-border-color: #f1aeb5;
  --bs-toast-header-bg: #f5c2c7;
  --bs-toast-header-color: #58151c;
  --bs-toast-color: #58151c;
  background: #f8d7da;
  border-left-color: #dc3545;
}

.teknexus-toast--error .toast-header,
.teknexus-toast--error .toast-body {
  background: transparent;
  color: #58151c;
}

.tnx-app-update-banner {
  position: sticky;
  top: 0;
  z-index: 11000;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding: 0.65rem 1rem;
  background: #e8f1ea;
  color: #1a2e24;
  border-bottom: 1px solid #9bb8a3;
  font-family: var(--teknexus-font-sans);
}

.tnx-app-update-banner__text {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.4;
}

.tnx-app-update-banner__note {
  display: block;
  margin-top: 0.2rem;
  color: #3d5a4c;
}

.tnx-app-update-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tnx-app-update-banner__primary,
.tnx-app-update-banner__later {
  font: inherit;
  font-size: 0.85rem;
  padding: 0.35rem 0.8rem;
  border-radius: 4px;
  cursor: pointer;
}

.tnx-app-update-banner__primary {
  border: 1px solid #1a2e24;
  background: #1a2e24;
  color: #f4f7f6;
}

.tnx-app-update-banner__later {
  border: 1px solid #9bb8a3;
  background: transparent;
  color: #1a2e24;
}
