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

/*
 *= require_tree .
 *= require_self
 */

/* Trix Editor Styling - Dark Theme */
trix-editor {
  background-color: #1f2937;
  border: 1px solid #4b5563;
  border-radius: 0.375rem;
  min-height: 200px;
  padding: 0.75rem;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  line-height: 1.6;
  color: #f3f4f6;
}

trix-editor:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

/* Trix Toolbar Styling - Dark Theme */
trix-toolbar {
  background-color: #374151;
  border: 1px solid #4b5563;
  border-bottom: none;
  border-radius: 0.375rem 0.375rem 0 0;
  padding: 0.5rem;
}

trix-toolbar .trix-button-group {
  margin-right: 0.5rem;
  border: 1px solid #6b7280;
  border-radius: 0.25rem;
  overflow: hidden;
}

trix-toolbar .trix-button {
  background-color: #4b5563;
  border: none;
  padding: 0.375rem 0.5rem;
  color: #f3f4f6;
  font-size: 0.875rem;
  transition: background-color 0.15s ease-in-out;
}

trix-toolbar .trix-button:hover {
  background-color: #6b7280;
}

trix-toolbar .trix-button.trix-active {
  background-color: #3b82f6;
  color: white;
}

/* Trix Dialog Styling - Dark Theme */
trix-toolbar .trix-dialog {
  background-color: #1f2937;
  border: 1px solid #4b5563;
  border-radius: 0.375rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
}

trix-toolbar .trix-dialog .trix-dialog__link-fields {
  background-color: #374151;
  border-radius: 0.25rem;
  padding: 0.5rem;
}

trix-toolbar .trix-dialog .trix-dialog__link-fields input {
  background-color: #1f2937;
  border: 1px solid #6b7280;
  border-radius: 0.25rem;
  color: #f3f4f6;
  padding: 0.375rem 0.5rem;
}

trix-toolbar .trix-dialog .trix-dialog__link-fields input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
  outline: none;
}

/* Trix Content Styling */
trix-editor h1 {
  font-size: 1.875rem;
  font-weight: 700;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
  line-height: 1.2;
}

trix-editor h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-top: 1.25rem;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

trix-editor h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

trix-editor p {
  margin-bottom: 1rem;
}

trix-editor ul, trix-editor ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

trix-editor li {
  margin-bottom: 0.25rem;
}

trix-editor a {
  color: #3b82f6;
  text-decoration: underline;
}

trix-editor a:hover {
  color: #1d4ed8;
}

/* Dark theme compatibility for Trix in edit mode */
.trix-content {
  color: #f3f4f6;
}

/* Form styling improvements for dark theme */
textarea, input[type="text"], input[type="email"], 
.form-control, .form-input {
  background-color: #1f2937 !important;
  border: 1px solid #4b5563 !important;
  color: #f3f4f6 !important;
}

/* Specific styling for notes field */
textarea[name*="notes"] {
  background-color: #1f2937 !important;
  border: 1px solid #4b5563 !important;
  color: #f3f4f6 !important;
  padding: 0.75rem !important; /* Match Trix editor padding */
}

textarea:focus, input[type="text"]:focus, input[type="email"]:focus {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3) !important;
  outline: none !important;
}

/* Placeholder text styling */
textarea::placeholder, input::placeholder {
  color: #9ca3af !important;
}

/* Button cursor styling */
button, input[type="submit"], .btn {
  cursor: pointer;
}

/* Turbo frame styling fixes */
turbo-frame {
  display: block;
}