@plugin "@tailwindcss/typography";

/* Annotation highlight colors */
mark.annotation {
  cursor: pointer;
  padding: 2px 0;
  border-radius: 2px;
  transition: background-color 0.2s;
  background-color: rgba(255, 255, 0, 0.3); /* Default yellow */
}

mark.annotation.annotation-yellow {
  background-color: rgba(255, 255, 0, 0.3) !important;
}

mark.annotation.annotation-blue {
  background-color: rgba(59, 130, 246, 0.3) !important;
}

mark.annotation.annotation-green {
  background-color: rgba(34, 197, 94, 0.3) !important;
}

mark.annotation.annotation-pink {
  background-color: rgba(236, 72, 153, 0.3) !important;
}

mark.annotation.annotation-hover {
  opacity: 0.8;
  filter: brightness(1.1);
}

mark.annotation.annotation-active {
  background-color: rgba(251, 146, 60, 0.5) !important;
  outline: 2px solid rgb(251, 146, 60);
}

/* Annotation toolbar */
#annotation-toolbar {
  position: absolute;
  z-index: 50;
  background: #1e40af; /* Blue background */
  border: 2px solid #1e3a8a; /* Darker blue border */
  border-radius: 8px;
  padding: 6px 8px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.15);
  display: none;
  animation: fadeIn 0.2s ease-in;
}

#annotation-toolbar .annotation-add-btn {
  background: white;
  color: #1e40af;
  font-weight: 600;
  font-size: 14px;
  padding: 10px 20px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

#annotation-toolbar .annotation-add-btn:hover {
  background: #f0f9ff;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
}

#annotation-toolbar .annotation-add-btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Annotation popup */
.annotation-popup {
  position: fixed;
  z-index: 1000;
}

/* Modal styling fixes */
#annotation-modal {
  backdrop-filter: blur(4px);
}

#annotation-modal svg {
  max-width: 24px;
  max-height: 24px;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}

#annotation-modal button svg {
  width: 1.5rem;
  height: 1.5rem;
}

#annotation-modal .prose svg {
  max-width: 100%;
  max-height: 100%;
}

#annotation-modal input[type="text"],
#annotation-modal select,
#annotation-modal textarea {
  font-size: 14px;
}

#annotation-modal label {
  font-size: 14px;
}

#annotation-modal h3 {
  font-size: 1.25rem;
  line-height: 1.75rem;
}

/* Rich text content display */
.prose.annotation-note {
  color: #374151;
}

.prose.annotation-note p {
  margin-bottom: 0.5rem;
}

.prose.annotation-note strong {
  font-weight: 600;
}

.prose.annotation-note em {
  font-style: italic;
}

.prose.annotation-note ul,
.prose.annotation-note ol {
  margin-left: 1rem;
  margin-bottom: 0.5rem;
}

/* Color utilities for dynamic classes */
.bg-yellow-100 {
  background-color: rgba(254, 249, 195, 1);
}

.border-yellow-500 {
  border-color: rgba(234, 179, 8, 1);
}

.bg-blue-100 {
  background-color: rgba(219, 234, 254, 1);
}

.border-blue-500 {
  border-color: rgba(59, 130, 246, 1);
}

.bg-green-100 {
  background-color: rgba(220, 252, 231, 1);
}

.border-green-500 {
  border-color: rgba(34, 197, 94, 1);
}

.bg-pink-100 {
  background-color: rgba(252, 231, 243, 1);
}

.border-pink-500 {
  border-color: rgba(236, 72, 153, 1);
}

/* Inline highlight color indicators */
.annotation-yellow {
  background-color: rgba(255, 255, 0, 0.3);
}

.annotation-blue {
  background-color: rgba(59, 130, 246, 0.3);
}

.annotation-green {
  background-color: rgba(34, 197, 94, 0.3);
}

.annotation-pink {
  background-color: rgba(236, 72, 153, 0.3);
}
