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

/* Modal animations */
.modal-overlay {
  animation: fadeIn 0.2s ease-out;
}

.modal-content {
  animation: slideIn 0.2s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Ensure modal is above everything */
#modal {
  z-index: 9999;
}

/* TRIX */
.trix-button-group {
  margin-right: 0 !important;
  margin-bottom: 0 !important;
  /* Remove gaps between button groups */
}

.trix-button-group:not(:first-child) {
  margin-left: 0 !important;
}

.trix-button-group+.trix-button-group::before {
  display: none;
  /* Remove separator lines between groups */
}

/* Ensure toolbar doesn't overflow */
.trix-toolbar .trix-button-row {
  flex-wrap: wrap;
  overflow: visible;
}

/* Make sure container accommodates full toolbar width */
.trix-content {
  min-width: 0;
}

.trix-editor {
  min-width: 0;
}

/* TRIX TOOLBAR */
/* Replace your existing TRIX TOOLBAR section with this */
/* Add this to your TRIX TOOLBAR section */
trix-toolbar {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
  display: block;
}

trix-toolbar .trix-button-row {
  background: white;
  border: 1px solid #d1d5db;
  border-bottom: none;
  border-radius: 0.375rem 0.375rem 0 0;
  padding: 0rem 0rem;
  /* Add some padding back for the buttons */
  margin: 0;
  margin-bottom: 0 !important;
  /* Ensure no bottom margin */
  display: flex;
  align-items: center;
  gap: 0rem;
}

trix-editor {
  /* border-top: none !important; */
  border-top: 2px solid #9ca3af !important;
  /* Gray border */
  border-radius: 0 0 0.375rem 0.375rem !important;
  margin-top: 0 !important;
  padding-top: 0rem !important;
  /* Ensure consistent padding with your other inputs */
}

/* Remove any potential spacing between toolbar and editor */
trix-toolbar+trix-editor,
trix-editor {
  margin-top: 0 !important;
}

/* Focus states to match your inputs */
trix-editor:focus-within {
  outline: 2px solid transparent;
  outline-offset: 2px;
  box-shadow: 0 0 0 2px #3b82f6;
}

trix-toolbar .trix-button {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 0.25rem;
  padding: 0rem 0rem;
  margin: 0;
  color: #374151;
  font-size: 0.875rem;
  flex: none;
  min-height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

trix-toolbar .trix-button:hover {
  background: #f3f4f6;
}

trix-toolbar .trix-button.trix-active {
  background: #dbeafe;
  color: #1e40af;
}

/* Add this to your application.css after the existing TRIX TOOLBAR section */

/* TRIX CONTENT STYLES - Updated for nested trix-content */
.trix-content ul,
.trix-content .trix-content ul {
  list-style-type: disc !important;
  margin: 0.5rem 0 0.5rem 1.5rem !important;
  padding: 0 !important;
}

.trix-content ol,
.trix-content .trix-content ol {
  list-style-type: decimal !important;
  margin: 0.5rem 0 0.5rem 1.5rem !important;
  padding: 0 !important;
}

.trix-content li,
.trix-content .trix-content li {
  margin: 0.25rem 0 !important;
  padding: 0 !important;
  display: list-item !important;
  line-height: 1.5 !important;
  list-style-position: outside !important;
}

/* Nested lists */
.trix-content ul ul,
.trix-content .trix-content ul ul {
  list-style-type: circle !important;
  margin-left: 1.5rem !important;
}

.trix-content ol ol,
.trix-content .trix-content ol ol {
  list-style-type: lower-alpha !important;
  margin-left: 1.5rem !important;
}