/* Component classes shared by every app. Each app sets --accent in its own
   stylesheet, so the same button styles carry that app's colour. */

:root {
  --accent: #0ea5e9;
  --accent-hover: #38bdf8;
  --accent-fg: #020617;
}

.btn {
  border-radius: 0.5rem;
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 500;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}
.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn-primary {
  background-color: var(--accent);
  color: var(--accent-fg);
}
.btn-primary:hover {
  background-color: var(--accent-hover);
}

.btn-ghost {
  border: 1px solid rgb(51 65 85);
  color: rgb(203 213 225);
}
.btn-ghost:hover {
  border-color: rgb(100 116 139);
  color: rgb(241 245 249);
}

.btn-alarm {
  background-color: rgb(244 63 94);
  color: rgb(255 241 242);
}
.btn-alarm:hover {
  background-color: rgb(251 113 133);
}

/* A quiet secondary field: metadata, not the main input. */
.name-input {
  border: 0;
  border-bottom: 1px solid rgb(51 65 85);
  background-color: transparent;
  padding: 0.375rem 0.25rem;
  color: rgb(226 232 240);
  transition: border-color 150ms ease;
}
.name-input::placeholder {
  color: rgb(100 116 139);
}
.name-input:focus {
  outline: none;
  border-bottom-color: var(--accent);
}

.kbd {
  border-radius: 0.25rem;
  border: 1px solid rgb(51 65 85);
  padding: 0 0.25rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.6875rem;
  color: rgb(148 163 184);
}

.card-alerting {
  animation: card-pulse 1.1s ease-in-out infinite;
}

@keyframes card-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(244, 63, 94, 0.45); }
  50% { box-shadow: 0 0 0 10px rgba(244, 63, 94, 0); }
}

.toast {
  animation: toast-in 200ms ease-out;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(0.5rem); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .card-alerting,
  .toast {
    animation: none;
  }
}
