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

/* Trix Editor Customization */
trix-toolbar * {
  box-sizing: border-box;
}

trix-toolbar {
  background-color: #fafafa;
  border: 1px solid rgba(24, 24, 27, 0.1);
  border-bottom: none;
  border-radius: 0.5rem 0.5rem 0 0;
  padding: 0.5rem;
}

trix-toolbar .trix-button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  border: none;
}

trix-toolbar .trix-button-group {
  display: flex;
  gap: 0.25rem;
  margin: 0;
  border: none;
}

trix-toolbar .trix-button {
  background-color: white;
  border: 1px solid rgba(24, 24, 27, 0.1);
  border-radius: 0.375rem;
  padding: 0.375rem 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #18181b;
  cursor: pointer;
  transition: all 0.15s;
}

trix-toolbar .trix-button:hover {
  background-color: rgba(24, 24, 27, 0.05);
  border-color: rgba(24, 24, 27, 0.2);
}

trix-toolbar .trix-button.trix-active {
  background-color: #18181b;
  color: white;
  border-color: #18181b;
}

trix-toolbar .trix-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

trix-toolbar .trix-button--icon {
  width: 2rem;
  height: 2rem;
  padding: 0.375rem;
}

trix-toolbar .trix-dialogs {
  position: relative;
}

trix-toolbar .trix-dialog {
  background-color: white;
  border: 1px solid rgba(24, 24, 27, 0.1);
  border-radius: 0.5rem;
  padding: 0.75rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

trix-toolbar .trix-dialog__link-fields {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

trix-toolbar .trix-input {
  border: 1px solid rgba(24, 24, 27, 0.1);
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
}

trix-toolbar .trix-input:focus {
  outline: none;
  border-color: rgba(24, 24, 27, 0.2);
  box-shadow: 0 0 0 2px rgba(24, 24, 27, 0.05);
}

trix-toolbar .trix-button-group--file-tools {
  display: none;
}

trix-editor {
  min-height: 15rem;
  border: 1px solid rgba(24, 24, 27, 0.1);
  border-radius: 0 0 0.5rem 0.5rem;
  padding: 0.75rem;
  font-size: 0.875rem;
  line-height: 1.5;
}

trix-editor:focus {
  outline: none;
  border-color: rgba(24, 24, 27, 0.2);
  box-shadow: 0 0 0 2px rgba(24, 24, 27, 0.05);
}

trix-editor h1 {
  font-size: 1.875rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

trix-editor a {
  color: #2563eb;
  text-decoration: underline;
}

trix-editor ul,
trix-editor ol {
  list-style-position: inside;
  margin-bottom: 1rem;
}

trix-editor ul {
  list-style-type: disc;
}

trix-editor ol {
  list-style-type: decimal;
}

trix-editor blockquote {
  border-left: 4px solid rgba(24, 24, 27, 0.1);
  padding-left: 1rem;
  margin-left: 0;
  font-style: italic;
}

/* Processing Modal - Navigation Blocking */
body.modal-open {
  overflow: hidden;
}

body.modal-open > *:not(#processing_modal) {
  pointer-events: none;
}
