/* Shared annotation modal styles (safe to load on any page). */
.gc-annotate-enabled * {
  cursor: crosshair !important;
}

.gc-annotate-overlay {
  position: fixed;
  inset: 0;
  z-index: 300000;
  background: rgba(11, 20, 36, 0.48);
  display: grid;
  place-items: center;
  padding: 20px;
  overflow-y: auto;
}

.gc-annotate-overlay[hidden] {
  display: none !important;
}

.gc-annotate-modal {
  width: min(640px, 96vw);
  max-height: min(90vh, 760px);
  background: #ffffff;
  border: 1px solid rgba(18, 44, 88, 0.2);
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(21, 49, 84, 0.3);
  padding: 16px;
  display: grid;
  gap: 10px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.gc-annotate-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.gc-annotate-close {
  border: 0;
  border-radius: 999px;
  width: 34px;
  height: 34px;
  font-weight: 800;
  background: #eef3ff;
  color: #1c3f8e;
}

.gc-annotate-target,
.gc-annotate-comment {
  width: 100%;
  border: 1px solid rgba(18, 44, 88, 0.2);
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
}

.gc-annotate-image {
  width: 100%;
  font: inherit;
}

.gc-annotate-image-preview {
  border: 1px dashed rgba(18, 44, 88, 0.3);
  border-radius: 12px;
  padding: 10px;
  display: grid;
  gap: 8px;
}

.gc-annotate-image-preview-img {
  max-width: 100%;
  max-height: 180px;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid rgba(18, 44, 88, 0.2);
  background: #f6f9ff;
}

.gc-annotate-image-preview-meta {
  font-size: 0.8rem;
  color: #365177;
}

.gc-annotate-image-clear {
  justify-self: start;
  border: 1px solid rgba(18, 44, 88, 0.2);
  border-radius: 999px;
  padding: 6px 10px;
  font-weight: 700;
  background: #f8fbff;
  color: #17324d;
}

.gc-annotate-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.gc-annotate-actions button {
  border: 1px solid rgba(18, 44, 88, 0.2);
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 700;
  background: #f4f7ff;
  color: #17324d;
}

.gc-annotate-add {
  background: linear-gradient(135deg, #1e5eff, #52a7ff) !important;
  color: #fff !important;
  border-color: transparent !important;
}

.gc-annotate-save {
  background: linear-gradient(135deg, #1f9d55, #3ccf8e) !important;
  color: #fff !important;
  border-color: transparent !important;
}

.gc-annotate-send {
  background: linear-gradient(135deg, #f59e0b, #f97316) !important;
  color: #fff !important;
  border-color: transparent !important;
}

.gc-annotate-clear {
  background: linear-gradient(135deg, #ef4444, #dc2626) !important;
  color: #fff !important;
  border-color: transparent !important;
}

.gc-annotate-list {
  border: 1px dashed rgba(18, 44, 88, 0.3);
  border-radius: 12px;
  padding: 10px;
  font-size: 12px;
  line-height: 1.45;
  max-height: min(34vh, 220px);
  overflow: auto;
  display: grid;
  gap: 10px;
  -webkit-overflow-scrolling: touch;
}

.gc-annotate-item {
  border: 1px solid rgba(18, 44, 88, 0.15);
  border-radius: 10px;
  padding: 8px;
  background: #fbfdff;
}

.gc-annotate-item-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.gc-annotate-item-head-copy {
  min-width: 0;
}

.gc-annotate-item-hint {
  margin-top: 3px;
  color: #6d82a4;
  font-size: 0.78rem;
}

.gc-annotate-item-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.gc-annotate-item-actions button {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid rgba(18, 44, 88, 0.18);
  background: #ffffff;
  color: #17324d;
  font-weight: 800;
  padding: 0;
  display: grid;
  place-items: center;
  line-height: 1;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.gc-annotate-item-actions button svg {
  width: 16px;
  height: 16px;
  display: block;
}

.gc-annotate-item-actions button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(18, 44, 88, 0.12);
}

.gc-annotate-item-actions button:focus-visible {
  outline: 2px solid rgba(30, 94, 255, 0.45);
  outline-offset: 2px;
}

.gc-annotate-item-expand {
  background: #eef4ff !important;
  color: #1c3f8e !important;
}

.gc-annotate-item-expand:hover {
  background: #dce8ff !important;
}

.gc-annotate-item-delete {
  background: #fff1f1 !important;
  color: #b91c1c !important;
}

.gc-annotate-item-delete:hover {
  background: #ffdede !important;
}

.gc-annotate-item-body {
  display: none;
  margin-top: 8px;
}

.gc-annotate-item.is-expanded .gc-annotate-item-body {
  display: grid;
  gap: 8px;
}

.gc-annotate-item.is-expanded {
  border-color: rgba(30, 94, 255, 0.24);
  box-shadow: inset 0 0 0 1px rgba(30, 94, 255, 0.05);
}

.gc-annotate-queue-title {
  font-weight: 800;
  color: #1b3d73;
  margin-bottom: 4px;
}

.gc-annotate-item-title {
  font-weight: 700;
  color: #15355d;
  margin-bottom: 4px;
}

.gc-annotate-item-note {
  color: #233f64;
  white-space: pre-wrap;
}

.gc-annotate-item-image {
  margin-top: 8px;
  width: 100%;
  max-height: 150px;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid rgba(18, 44, 88, 0.2);
}

.gc-annotate-help {
  margin: 0;
  color: #4f6280;
  font-size: 0.85rem;
}

.gc-annotate-feedback {
  margin: 0;
  min-height: 1.2em;
  color: #1c3f8e;
  font-size: 0.84rem;
}

.gc-annotate-toggle {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 250000;
  border: 1px solid rgba(18, 44, 88, 0.2);
  background: #ffffff;
  color: #16304a;
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 800;
  box-shadow: 0 10px 28px rgba(21, 49, 84, 0.18);
}

.gc-annotate-enabled .gc-annotate-toggle {
  background: linear-gradient(135deg, #1e5eff, #52a7ff);
  color: #ffffff;
  border-color: transparent;
}
