/* WYSIWYG Editor Styles */
.wysiwyg-editor [contenteditable] {
  outline: none !important;
}

.wysiwyg-editor [contenteditable]:empty:before {
  content: attr(placeholder);
  color: #6c757d;
  font-style: italic;
}

.wysiwyg-editor [contenteditable]:focus:before {
  display: none;
}

/* Tag Styles */
.mention-tag, .hashtag-tag {
  display: inline-block;
  font-size: 0.875em;
  font-weight: 500;
  border-radius: 0.375rem;
  padding: 0.25em 0.5em;
  margin: 0 0.125em;
  cursor: pointer;
  text-decoration: none;
  user-select: none;
}

.mention-tag:hover, .hashtag-tag:hover {
  text-decoration: none;
  opacity: 0.8;
}

/* Suggestions Dropdown */
.wysiwyg-suggestions {
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 0.375rem;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  max-width: 300px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 1000;
}

.wysiwyg-suggestions .suggestion-item {
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  border-bottom: 1px solid #f8f9fa;
  transition: background-color 0.15s ease-in-out;
}

.wysiwyg-suggestions .suggestion-item:last-child {
  border-bottom: none;
}

.wysiwyg-suggestions .suggestion-item:hover,
.wysiwyg-suggestions .suggestion-item.active {
  background-color: #e9ecef;
}

.wysiwyg-suggestions .suggestion-item.selected {
  background-color: #0d6efd;
  color: white;
}

/* Toolbar Styles */
.wysiwyg-editor .btn {
  border-radius: 0.25rem;
}

.wysiwyg-editor .btn:focus {
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.wysiwyg-editor .vr {
  width: 1px;
  height: 1.5rem;
  background-color: #dee2e6;
  margin: 0 0.25rem;
}

/* Content Styles */
.wysiwyg-editor [contenteditable] strong {
  font-weight: bold;
}

.wysiwyg-editor [contenteditable] em {
  font-style: italic;
}

.wysiwyg-editor [contenteditable] u {
  text-decoration: underline;
}

.wysiwyg-editor [contenteditable] ul {
  list-style-type: disc;
  margin-left: 1.5rem;
}

.wysiwyg-editor [contenteditable] ol {
  list-style-type: decimal;
  margin-left: 1.5rem;
}

.wysiwyg-editor [contenteditable] li {
  margin-bottom: 0.25rem;
}

.wysiwyg-editor [contenteditable] a {
  color: #0d6efd;
  text-decoration: underline;
}

.wysiwyg-editor [contenteditable] a:hover {
  color: #0a58ca;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .wysiwyg-editor .d-flex {
    flex-wrap: wrap;
  }
  
  .wysiwyg-editor .btn {
    margin-bottom: 0.25rem;
  }
  
  .wysiwyg-suggestions {
    max-width: 250px;
  }
}

/* Accessibility */
.wysiwyg-editor [contenteditable]:focus {
  border-color: #86b7fe;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.mention-tag:focus,
.hashtag-tag:focus {
  outline: 2px solid #0d6efd;
  outline-offset: 2px;
}

/* Print Styles */
@media print {
  .wysiwyg-editor .border,
  .wysiwyg-editor .btn {
    display: none;
  }
  
  .mention-tag,
  .hashtag-tag {
    background: #f8f9fa !important;
    color: #212529 !important;
    border: 1px solid #dee2e6 !important;
  }
}