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

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;700;900&family=JetBrains+Mono:wght@400;700&family=Space+Mono:wght@400;700&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: -webkit-fill-available;
  overflow-x: hidden;
  overflow-y: visible;
}

main.no-scroll {
  overflow: hidden !important;
  position: fixed;
  width: 100%;
}

.hidden {
  display: none !important;
}

:root {
  --font-main: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --font-terminal: 'Space Mono', monospace;

  /* Base Colors */
  --ctp-rosewater: #f5e0dc;
  --ctp-flamingo: #f2cdcd;
  --ctp-pink: #f5c2e7;
  --ctp-mauve: #cba6f7;
  --ctp-red: #f38ba8;
  --ctp-darkred: #e64553;
  --ctp-maroon: #eba0ac;
  --ctp-peach: #fab387;
  --ctp-yellow: #ffe65a;
  --ctp-green: #a6e3a1;
  --ctp-teal: #94e2d5;
  --ctp-sky: #89dceb;
  --ctp-sapphire: #74c7ec;
  --ctp-blue: #89b4fa;
  --ctp-lavender: #b4befe;

  /* Surface/Background Colors */
  --ctp-text: #cdd6f4;
  --ctp-subtext1: #bac2de;
  --ctp-subtext0: #a6adc8;
  --ctp-overlay2: #9399b2;
  --ctp-overlay1: #7f849c;
  --ctp-overlay0: #6c7086;
  --ctp-surface2: #585b70;
  --ctp-surface1: #45475a;
  --ctp-surface0: #313244;
  --ctp-base: #1e1e2e;
  --ctp-mantle: #181825;
  --ctp-crust: #11111b;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
}

#flash-container {
  position: fixed;
  top: 5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  width: 100%;
  max-width: 500px;
  padding: 0 1rem;
  pointer-events: none;
}

.flash-message {
  pointer-events: auto;
  padding: 0.75rem 1rem;
  margin-bottom: 0.5rem;
  border-radius: 0.5rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.875rem;
  border: 1px solid transparent;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
  animation: slide-in 0.3s ease-out;
}

/* Alert/Error */
.flash-message.alert {
  background-color: rgba(243, 139, 168, 0.95);
  color: #11111b;
  border-color: var(--ctp-red);
}

/* Notice/Success */
.flash-message.notice {
  background-color: rgba(166, 227, 161, 0.95);
  color: #11111b;
  border-color: var(--ctp-green);
}

.flash-prefix {
  font-weight: 900;
  margin-right: 0.5rem;
}

@keyframes slide-in {
  from { transform: translateY(-20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

#error_explanation {
  background-color: rgba(243, 139, 168, 0.1); /* Subtle Red tint */
  border: 1px solid var(--ctp-red);
  border-radius: 0.75rem;
  padding: 1rem;
  margin-bottom: 1.5rem;
  font-family: 'JetBrains Mono', 'Space Mono', monospace;
}

#error_explanation h2 {
  display: none; /* Hide the "X errors prohibited..." heading for a cleaner look */
}

#error_explanation ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

#error_explanation ul li {
  color: var(--ctp-red);
  font-size: 0.813rem;
  line-height: 1.5;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

/* Add a terminal prompt or dot before each error */
#error_explanation ul li::before {
  content: "[!]";
  font-weight: bold;
  flex-shrink: 0;
}

#main_content {
  padding-bottom: 1rem;
}