/**
 * QA Overlay Styles
 *
 * Usage:
 *   <link rel="stylesheet" href="qa-overlay.css">
 *
 * Or with npm:
 *   import 'qa-overlay/css';
 */

/* Container - hidden by default */
#qa-overlay-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2147483646; /* Max safe z-index minus 1 */
}

#qa-overlay-container.qa-overlay-hidden {
  display: none;
}

#qa-overlay-container.qa-overlay-active {
  display: block;
}

/* Status indicator */
.qa-status {
  position: fixed;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  padding: 8px 16px;
  border-radius: 4px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 13px;
  pointer-events: auto;
  z-index: 2147483647; /* Max safe z-index */
}

.qa-status span {
  font-weight: bold;
}

#qa-status-text {
  color: #ff6b6b;
}

.qa-overlay-active #qa-status-text {
  color: #69db7c;
}

#qa-pin-count {
  color: #aaa;
  font-weight: normal !important;
  margin-left: 8px;
}

/* Pins container */
#qa-pins {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2147483646;
}

/* Individual pin */
.qa-pin {
  position: absolute;
  width: 24px;
  height: 24px;
  background: #ce3a1e;
  border: 2px solid #fff;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg) translate(5px, calc(-70% - 15px));
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  pointer-events: auto;
  z-index: 2147483645;
  transition: transform 0.15s ease;
}

.qa-pin:hover {
  transform: rotate(-45deg) translate(5px, calc(-70% - 15px)) scale(1.2);
}

.qa-pin-number {
  position: absolute;
  top: 42%;
  left: 42%;
  transform: rotate(45deg) translate(calc(-50% - 1px), calc(-50% + 3px));
  color: #fff;
  font-size: 11px;
  font-weight: bold;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1;
}

.qa-pin-tooltip {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  margin-top: 8px;
  background: rgba(0, 0, 0, 0.9);
  color: #fff;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  white-space: nowrap;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.qa-pin:hover .qa-pin-tooltip {
  opacity: 1;
}

/* Note input modal */
#qa-note-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  z-index: 2147483647;
}

#qa-note-modal.qa-modal-hidden {
  display: none;
}

#qa-note-dialog {
  background: #fff;
  padding: 24px;
  border-radius: 8px;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

#qa-note-dialog h3 {
  margin: 0 0 8px 0;
  font-size: 18px;
  color: #333;
}

.qa-hint {
  margin: 0 0 16px 0;
  font-size: 13px;
  color: #666;
}

#qa-note-input {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  box-sizing: border-box;
}

#qa-note-input:focus {
  outline: none;
  border-color: #ce3a1e;
}

.qa-modal-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

.qa-modal-buttons button {
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
}

#qa-note-cancel {
  background: #e8e8e8;
  color: #333;
}

#qa-note-cancel:hover {
  background: #d8d8d8;
}

#qa-note-save {
  background: #ce3a1e;
  color: #fff;
}

#qa-note-save:hover {
  background: #b5331a;
}

/* Click capture overlay - only when active */
.qa-click-capture {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  cursor: crosshair;
  pointer-events: auto;
  z-index: 2147483644;
}
