/* Editor Container */
.editor-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--mid-gray);
  border-radius: var(--border-radius);
  overflow: hidden;
  background-color: white;
  box-shadow: var(--shadow);
}

/* Editor Toolbar */
.editor-toolbar {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  background-color: var(--light-gray);
  border-bottom: 1px solid var(--mid-gray);
  flex-wrap: wrap;
  gap: 12px;
  border-radius: var(--border-radius) var(--border-radius) 0 0;
}






/* Animation for the AI Example button */
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

#load-ai-example {
  width: auto;
  padding: 0 16px;
  margin-left: 10px;
  font-size: 0.95rem;
  background-color: var(--success-color);
  color: white;
  border: none;
  font-weight: 500;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  height: 36px;
  transition: all 0.2s ease;
  animation: pulse 2s infinite;
  border-radius: var(--border-radius);
}

#load-ai-example i {
  margin-right: 8px;
  font-size: 1rem;
}

#load-ai-example:hover {
  background-color: #0da271;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

/* Text Stats */
.text-stats {
  margin-left: auto;
  display: flex;
  gap: 15px;
  font-size: 0.85rem;
  color: var(--light-text);
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .text-stats {
    flex-basis: 100%;
    margin-top: 10px;
    margin-left: 0;
    justify-content: center;
  }
}

/* Editor Content */
.editor-content {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
  min-height: 350px;
  line-height: 1.6;
  font-family: var(--font-family);
  font-size: 1rem;
  color: var(--text-color);
  caret-color: black;
  outline: none;
}

.editor-content:empty:before {
  content: attr(placeholder);
  color: var(--dark-gray);
  font-style: italic;
}

/* Markdown Mode */
.editor-content:focus {
  outline: none;
}

[contenteditable="true"].editor-content {
  white-space: pre-wrap;
}

/* Editor Styling */
.editor-content p {
  margin-bottom: 1em;
}

.editor-content ul, .editor-content ol {
  margin-bottom: 1em;
  margin-left: 1.5em;
}

.editor-content blockquote {
  border-left: 3px solid var(--primary-color);
  padding-left: 15px;
  margin-left: 0;
  color: var(--light-text);
  background-color: rgba(99, 102, 241, 0.05);
  border-radius: 0 var(--border-radius) var(--border-radius) 0;
  padding: 8px 15px 8px 15px;
}

/* Code Block Styling */
.editor-content pre {
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--border-radius);
  padding: 12px;
  margin-bottom: 1em;
  overflow-x: auto;
}

.editor-content code {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
  font-size: 0.9em;
}

.editor-content pre code {
  padding: 0;
  border: none;
  background: none;
  display: block;
}

.editor-content p code {
  background-color: #f1f5f9;
  padding: 2px 5px;
  border-radius: 4px;
  font-size: 0.9em;
  color: #3730a3;
}

/* Highlighting for invisible characters */
.invisible-char {
  display: inline-block;
  padding: 2px 5px;
  border-radius: 4px;
  background-color: rgba(239, 68, 68, 0.15);
  color: var(--error-color);
  font-size: 0.8em;
  font-family: monospace;
  cursor: help;
  vertical-align: middle;
  margin: 0 2px;
  border: 1px dashed var(--error-color);
}

.char-code {
  font-family: monospace;
  font-size: 0.85em;
  background-color: rgba(0, 0, 0, 0.05);
  padding: 1px 2px;
  border-radius: 2px;
}

.small-button {
  font-size: 0.85rem;
  padding: 4px 8px;
  background-color: var(--light-gray);
  border: 1px solid var(--mid-gray);
  border-radius: var(--border-radius);
  cursor: pointer;
  margin-top: 5px;
  transition: all 0.2s ease;
}

.small-button:hover {
  background-color: var(--mid-gray);
  transform: translateY(-1px);
}

/* Highlighting for suspicious phrases */
.suspicious-phrase {
  background-color: rgba(245, 158, 11, 0.15);
  border-bottom: 1px dashed var(--warning-color);
  padding: 0 2px;
  cursor: help;
  border-radius: 2px;
}

/* Emoji Highlighting */
.emoji-highlight {
  position: relative;
  background-color: rgba(139, 92, 246, 0.1);
  border-radius: 3px;
  padding: 0 2px;
}

/* Tooltip styling */
.tooltip {
  position: absolute;
  background-color: white;
  color: var(--text-color);
  padding: 8px 12px;
  border-radius: var(--border-radius);
  font-size: 0.9rem;
  box-shadow: var(--shadow);
  max-width: 300px;
  z-index: 100;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  border: 1px solid var(--mid-gray);
}

.tooltip.visible {
  opacity: 1;
}

.tooltip-title {
  font-weight: 600;
  margin-bottom: 5px;
  color: var(--primary-color);
}

.tooltip-description {
  font-size: 0.85rem;
  color: var(--light-text);
}

/* Focus styles */
.editor-content:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: -2px;
} 