/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* Self-hosted Geist (variable, weights 100–900). Loaded here so it's available
   on every page — marketing, dashboard, canvas editor, and embeds. Propshaft
   rewrites the url() below to the digested asset path. */
@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/Geist-Variable-b6b8c383.ttf") format("truetype");
}

:root {
  --bg: #0b1220;
  --panel: #121a2b;
  --panel2: #0f1726;
  --border: #243047;
  --text: #e6edf7;
  --muted: #8ea0bd;
  --accent: #38bdf8;
  --accent2: #22d3ee;
  --danger: #f87171;
}

/* In-app replacement for the browser's window.confirm() on destructive
   actions. Driven by app/javascript/confirm_modal.js (Turbo confirm method). */
.app-confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(3, 8, 18, 0.72);
  backdrop-filter: blur(2px);
}
.app-confirm-overlay[hidden] { display: none; }

.app-confirm {
  width: 100%;
  max-width: 26rem;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 0.9rem;
  padding: 1.5rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
  animation: app-confirm-in 0.14s ease-out;
}
@keyframes app-confirm-in {
  from { opacity: 0; transform: translateY(6px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}

.app-confirm-title {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}
.app-confirm-msg {
  margin: 0 0 1.25rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--muted);
}
.app-confirm-msg[hidden] { display: none; }

.app-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
}
.app-confirm-btn {
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 0.55rem;
  border: 1px solid transparent;
  transition: filter 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}
.app-confirm-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.app-confirm-cancel {
  background: transparent;
  border-color: var(--border);
  color: var(--muted);
}
.app-confirm-cancel:hover { background: var(--panel2); color: var(--text); }
.app-confirm-ok {
  background: var(--danger);
  color: #2a0808;
}
.app-confirm-ok:hover { filter: brightness(1.08); }
