/**
 * Grammar & Spellcheck Plugin Styles
 * 
 * - Red wavy underline = Spelling error
 * - Blue wavy underline = Grammar error
 */

/* Spelling error - red wavy underline (like MS Word) */
.spelling-error {
  text-decoration: underline wavy #e53935;
  text-decoration-skip-ink: none;
  cursor: pointer;
  position: relative;
}

/* Grammar error - blue wavy underline (like MS Word) */
.grammar-error {
  text-decoration: underline wavy #1976d2;
  text-decoration-skip-ink: none;
  cursor: pointer;
  position: relative;
}

/* Suggestion popup - matches context menu styling */
.gs-popup {
  position: fixed;
  background: white;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.1);
  padding: 4px 0;
  min-width: 180px;
  max-width: 320px;
  z-index: 2147483640;
  font-size: 14px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Header label (e.g., "Spelling") */
.gs-popup-header {
  padding: 6px 16px 4px;
  color: #666;
  font-size: 11px;
  font-style: italic;
  cursor: default;
  user-select: none;
}

/* Suggestions container */
.gs-popup-suggestions {
  max-height: 200px;
  overflow-y: auto;
}

/* Individual suggestion - matches context menu item */
.gs-popup-suggestion {
  padding: 8px 16px;
  cursor: pointer;
  transition: background-color 0.2s;
  user-select: none;
  white-space: nowrap;
  color: #1565c0;
  outline: none;
  border: none;
  background: transparent;
}

.gs-popup-suggestion:hover,
.gs-popup-suggestion.focused {
  background-color: #f0f0f0;
}

/* No suggestions message */
.gs-popup-no-suggestions {
  padding: 8px 16px;
  color: #999;
  font-style: italic;
}

/* Separator line - matches context menu separator */
.gs-popup-separator {
  height: 1px;
  background-color: #e0e0e0;
  margin: 4px 0;
}

/* Actions container */
.gs-popup-actions {
  /* No special background - matches context menu */
}

/* Action buttons (Add to Dictionary, Ignore) - matches context menu item */
.gs-popup-action {
  padding: 8px 16px;
  cursor: pointer;
  color: #333;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background-color 0.2s;
  user-select: none;
  white-space: nowrap;
}

.gs-popup-action:hover,
.gs-popup-action.focused {
  background-color: #f0f0f0;
}

/* Icon in action buttons */
.gs-icon {
  color: #666;
  font-size: 13px;
  width: 16px;
  text-align: center;
  flex-shrink: 0;
}

/* Context menu spelling suggestions (integrated into existing context menu) */
.writingml-context-menu .spelling-suggestion {
  color: #1565c0;
  font-weight: 500;
}

.writingml-context-menu .spelling-suggestion:hover {
  background: #e3f2fd;
}

/* Loading state indicator (optional - shown in status bar) */
.grammar-spellcheck-loading {
  color: #888;
  font-style: italic;
  font-size: 11px;
}

/* Disabled state - no underlines shown */
.grammar-spellcheck-disabled .spelling-error,
.grammar-spellcheck-disabled .grammar-error {
  text-decoration: none;
}
