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


body{
    --color-dark-blue: #161617;
    --color-lighter-blue: #0d1521;

    --primary-box-color: rgba(255, 255, 255, 0.035);

    max-width: 1400px;
    margin: 0 auto;
    background: var(--void);
    color: var(--ink);
    font-family: var(--font-sans);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Keeps the footer at the bottom of the viewport on pages with little content. */
.site-main {
    flex: 1 0 auto;
}

.flash-notice {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
    pointer-events: none;
    background-color: #1a3a1a;
    color: #90ee90;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    border: 1px solid #2d5a2d;
    animation: toast-fade 3s ease-in-out forwards;
}

@keyframes toast-fade {
    0%   { opacity: 1; transform: translateY(0); }
    70%  { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(0.5rem); }
}

.field_with_errors input,
.field_with_errors textarea,
.field_with_errors select {
  border-color: red;
}

.field_with_errors label {
  color: red;
}

/* ========================== */
/* == Footer (design system SiteFooter) == */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--space-2) var(--space-4);
  margin: var(--space-8) var(--space-6) 0;
  padding: var(--space-6) 0;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-muted);
}

.site-footer a {
  color: var(--ink-muted);
  text-decoration: none;
}

.site-footer a:hover,
.site-footer a.is-active {
  color: var(--ink);
}

/* ========================== */
/* == Flash Alert Banners == */
.flash-stack {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 200;
  max-width: min(420px, calc(100vw - 3rem));
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
  pointer-events: none;
}

.alert {
  max-width: 100%;
  padding: 0.85rem 1.25rem;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  animation: alert-slide-in 0.3s ease-out;
  border: 1px solid transparent;
  box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px) saturate(140%);
}

/* Errors stay until the next navigation; everything else fades out. */
.alert:not(.alert-error) {
  animation: alert-slide-in 0.3s ease-out, alert-fade-out 0.4s ease-in 5s forwards;
}

.alert-icon {
  flex-shrink: 0;
  font-size: 1.1rem;
}

.alert-success {
  background-color: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.3);
  color: #86efac;
}

.alert-error {
  background-color: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

.alert-info {
  background-color: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.3);
  color: #93c5fd;
}

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

@keyframes alert-fade-out {
  to { opacity: 0; transform: translateY(0.5rem); }
}