/* ===== REACT QUILL OVERRIDES ===== */
/* Centralized styles for ReactQuill across all creation/update pages */

/* Base container styling */
.quill {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  border: none;
  transition: all 0.3s ease;
}

/* Editor container */
.ql-container {
  border: none !important;
  font-family: inherit;
  font-size: 14px;
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
}

/* Toolbar styling */
.ql-toolbar {
  background: rgba(255, 255, 255, 0.03);
  border: none !important;
  border-bottom: none !important;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}

/* Toolbar buttons */
.ql-toolbar button {
  color: rgba(255, 255, 255, 0.7) !important;
  transition: all 0.2s ease;
}

.ql-toolbar button:hover {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.ql-toolbar button.ql-active {
  color: #dc3545 !important;
}

/* Toolbar stroke colors */
.ql-toolbar .ql-stroke {
  stroke: rgba(255, 255, 255, 0.7) !important;
}

.ql-toolbar .ql-stroke:hover {
  stroke: #fff !important;
}

.ql-toolbar .ql-active .ql-stroke {
  stroke: #dc3545 !important;
}

/* Toolbar fill colors */
.ql-toolbar .ql-fill {
  fill: rgba(255, 255, 255, 0.7) !important;
}

.ql-toolbar .ql-fill:hover {
  fill: #fff !important;
}

.ql-toolbar .ql-active .ql-fill {
  fill: #dc3545 !important;
}

/* Editor content area */
.ql-editor {
  color: #f8f9fa;
  background: transparent;
  min-height: 150px;
  padding: 15px;
  border-radius: 0 0 8px 8px;
}

/* Editor placeholder */
.ql-editor.ql-blank::before {
  color: rgba(255, 255, 255, 0.65);
  font-style: italic;
}

/* Specific rule for event description section */
.event_desc_section .ql-editor.ql-blank::before {
  color: rgba(255, 255, 255, 0.65) !important;
}

/* Editor focus state */
.quill:focus-within {
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.05);
}

/* Dropdown styling */
.ql-toolbar .ql-picker {
  color: rgba(255, 255, 255, 0.7) !important;
}

.ql-toolbar .ql-picker-label {
  border: 1px solid transparent !important;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  padding: 3px 5px;
}

.ql-toolbar .ql-picker-label:hover {
  border-color: rgba(255, 255, 255, 0.2) !important;
  background: rgba(255, 255, 255, 0.08);
}

.ql-toolbar .ql-expanded .ql-picker-label {
  border-color: rgba(255, 255, 255, 0.3) !important;
}

/* Dropdown options */
.ql-toolbar .ql-picker-options {
  background: rgb(33, 37, 41);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  padding: 5px;
}

.ql-toolbar .ql-picker-item {
  color: rgba(255, 255, 255, 0.7) !important;
  padding: 5px 10px;
  border-radius: 4px;
}

.ql-toolbar .ql-picker-item:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff !important;
}

.ql-toolbar .ql-selected {
  color: #dc3545 !important;
  background: rgba(220, 53, 69, 0.1);
}

/* Color picker */
.ql-toolbar .ql-color-picker .ql-picker-item {
  width: 20px;
  height: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  margin: 2px;
}

/* Scrollbar for editor */
.ql-editor::-webkit-scrollbar {
  width: 8px;
}

.ql-editor::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}

.ql-editor::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.ql-editor::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Mobile responsive */
@media (max-width: 768px) {
  .ql-toolbar button {
    padding: 8px !important;
  }
  
  .ql-editor {
    min-height: 120px;
    padding: 12px;
  }
}

/* Dark mode specific (already applied but for consistency) */
body.dark-mode-active .ql-snow.ql-toolbar button:hover .ql-fill,
body.dark-mode-active .ql-snow.ql-toolbar button:hover .ql-stroke.ql-fill {
  fill: #fff !important;
}

body.dark-mode-active .ql-snow.ql-toolbar button:hover .ql-stroke,
body.dark-mode-active .ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke {
  stroke: #fff !important;
}

/* Fix for panel integration */
.panel-content-body .quill {
  margin-bottom: 0;
}

.carousel-panel .quill {
  margin-bottom: 0;
}