/*
 * 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.
 */

/* Subtle bottom-left link to the /diagnostics admin view. Only rendered for
   authenticated users (see application.html.erb). Kept low-key — it's a
   utility surface, not a primary nav target. */
.diagnostics-footer-link {
  position: fixed;
  bottom: 6px;
  left: 8px;
  z-index: 1000;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  color: rgba(0, 0, 0, 0.35);
  text-decoration: none;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 6px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 3px;
  pointer-events: auto;
}
.diagnostics-footer-link:hover { color: #c0392b; }

/* Global toast — sibling of the page content, sits above the topbar/map.
   The toast_controller appends .toast-item children here. Mobile (default)
   anchors top-center under the safe-area inset; desktop pulls to the right
   edge so map filters stay readable underneath. */
.toast-container {
  position: fixed;
  top: max(16px, env(safe-area-inset-top));
  left: 0;
  right: 0;
  z-index: 5000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  padding: 0 16px;
  align-items: center;
}

.toast-item {
  background: var(--ink, #2a1f14);
  color: var(--paper, #faf6ee);
  padding: 12px 16px;
  border-radius: 4px;
  font-size: 14px;
  font-family: "Public Sans", system-ui, sans-serif;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  max-width: 480px;
  width: fit-content;
  pointer-events: auto;
  cursor: pointer;
  transform: translateY(-100%);
  opacity: 0;
  transition: transform 200ms ease-out, opacity 200ms ease-out;
}

.toast-item.is-visible {
  transform: translateY(0);
  opacity: 1;
}

.toast-item.toast-error   { background: #8b2e2e; }
.toast-item.toast-warning { background: #c66b3d; }
.toast-item.toast-success { background: #5c8a3e; }

@media (min-width: 769px) {
  .toast-container {
    left: auto;
    right: 16px;
    align-items: flex-end;
  }
}
