/**
 * Word Selector CSS for Vocabulary Manager
 */

.vocab-word-selector-popup {
  position: absolute;
  z-index: 99999;
  background-color: white;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  border-radius: 6px;
  padding: 10px 15px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  font-size: 14px;
  animation: vocab-fadeIn 0.2s ease;
  max-width: 280px;
}

@keyframes vocab-fadeIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.vocab-add-to-vocabulary-button {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: #4caf50;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 8px 12px;
  font-size: 14px;
  cursor: pointer;
  font-weight: 500;
  transition: background-color 0.2s;
}

.vocab-add-to-vocabulary-button:hover:not(:disabled) {
  background-color: #43a047;
}

.vocab-add-to-vocabulary-button:disabled {
  background-color: #8bc34a;
  cursor: not-allowed;
}

.vocab-add-to-vocabulary-button svg {
  width: 14px;
  height: 14px;
}

.vocab-word-added-message {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #4caf50;
  font-weight: 500;
}

.vocab-button-spinner {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: vocab-spin 1s linear infinite;
}

@keyframes vocab-spin {
  to {
    transform: rotate(360deg);
  }
}

/* RTL Support */
html[dir="rtl"] .vocab-add-to-vocabulary-button {
  flex-direction: row-reverse;
}

html[dir="rtl"] .vocab-word-added-message {
  flex-direction: row-reverse;
}

/* Responsive styles */
@media (max-width: 480px) {
  .vocab-word-selector-popup {
    max-width: 220px;
  }
}
