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

@keyframes toast-in-out {
  0%   { opacity: 0; transform: translateX(1rem); }
  4%   { opacity: 1; transform: translateX(0); }
  75%  { opacity: 1; transform: translateX(0); }
  100% { opacity: 0; transform: translateX(0.5rem); }
}

.flash-alert {
  animation: toast-in-out 6s 200ms both;
}

/* Override popover default positioning */
.flash-alert:popover-open {
  inset: auto;
  top: 1.25rem;
  right: 1.25rem;
}

/* Preview mode banner spacing */
body.preview-mode-active main {
  padding-top: 3.5rem;
}

@media (min-width: 640px) {
  body.preview-mode-active main {
    padding-top: 3.5rem;
  }
}


/* Blog editor and content styles */
.ProseMirror h2 { font-size: 1.5em; font-weight: 700; margin-top: 1em; margin-bottom: 0.5em; }
.ProseMirror h3 { font-size: 1.25em; font-weight: 600; margin-top: 0.75em; margin-bottom: 0.5em; }
.ProseMirror h4 { font-size: 1.1em; font-weight: 600; margin-top: 0.5em; margin-bottom: 0.25em; }
.ProseMirror blockquote { border-left: 4px solid #d1d5db; padding-left: 1em; margin-left: 0; margin-bottom: 0.5em; color: #4b5563; }
.ProseMirror pre { background-color: #1f2937; color: #e5e7eb; border-radius: 0.5em; padding: 1em; margin-bottom: 0.5em; overflow-x: auto; }
.ProseMirror code { background-color: #f3f4f6; padding: 0.15em 0.3em; border-radius: 0.25em; font-size: 0.875em; }
.ProseMirror pre code { background: none; padding: 0; border-radius: 0; font-size: inherit; }
.ProseMirror img { max-width: 100%; height: auto; border-radius: 0.5em; margin: 1em 0; }
.ProseMirror a { color: #2563eb; text-decoration: underline; }
.ProseMirror hr { border: none; border-top: 2px solid #e5e7eb; margin: 1.5em 0; }
