/*
 * 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 "trix/dist/trix";

/* Trix editor Bulma integration */
trix-editor {
  border: 1px solid #dbdbdb;
  border-radius: 4px;
  padding: 0.75rem;
  font-size: 1rem;
  line-height: 1.5;
  min-height: 120px;
}

trix-editor:focus {
  border-color: #485fc7;
  box-shadow: 0 0 0 0.125em rgba(72, 95, 199, 0.25);
  outline: none;
}

trix-editor.is-danger {
  border-color: #ff3860;
}

trix-editor.is-danger:focus {
  border-color: #ff3860;
  box-shadow: 0 0 0 0.125em rgba(255, 56, 96, 0.25);
}

/* Trix toolbar styling */
trix-toolbar {
  border: 1px solid #dbdbdb;
  border-bottom: none;
  border-radius: 4px 4px 0 0;
  background: #f5f5f5;
}

trix-editor + trix-toolbar {
  border-radius: 0 0 4px 4px;
  border-top: none;
  border-bottom: 1px solid #dbdbdb;
}

/* Rich text content styling */
.trix-content {
  line-height: 1.6;
}

.trix-content h1 {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.trix-content h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.trix-content p {
  margin-bottom: 1rem;
}

.trix-content ul, .trix-content ol {
  margin-bottom: 1rem;
  padding-left: 2rem;
}

.trix-content li {
  margin-bottom: 0.5rem;
}

.trix-content strong {
  font-weight: 600;
}

.trix-content em {
  font-style: italic;
}

.trix-content a {
  color: #485fc7;
  text-decoration: underline;
}

.trix-content a:hover {
  color: #3273dc;
}
