/*
 * VivaRevize print guard styles — modal overlay + missing-field highlight.
 * z-index 13500: below tour overlay (14000), above quickadd (800).
 */

.vr-printguard-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  z-index: 13500 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: rgba(0, 0, 0, .55) !important;
  padding: 16px !important;
  font-family: sans-serif;
  animation: vr-printguard-fade .15s ease-out;
}
@keyframes vr-printguard-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
html[data-vr-theme="light"] .vr-printguard-overlay {
  background: rgba(15, 23, 42, .45) !important;
}

.vr-printguard-modal {
  position: relative !important;
  max-width: 480px !important;
  width: calc(100% - 32px) !important;
  max-height: calc(100vh - 32px) !important;
  overflow-y: auto !important;
  z-index: 13501 !important;
  background: var(--panel, #101216) !important;
  color: var(--text, #eee) !important;
  border: 1px solid var(--border, #333);
  border-radius: 12px;
  padding: 20px 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
}
html[data-vr-theme="light"] .vr-printguard-modal {
  background: #ffffff !important;
  color: #1f2937 !important;
  border-color: #d1d5db !important;
}

.vr-printguard-title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 800;
  color: #dc2626;
}
html[data-vr-theme="light"] .vr-printguard-title { color: #b91c1c; }

.vr-printguard-intro {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.4;
  opacity: .9;
}

.vr-printguard-missing {
  margin: 0 0 16px;
  padding: 0 0 0 20px;
  list-style: none;
}
.vr-printguard-missing-item {
  position: relative;
  padding: 4px 0 4px 4px;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.4;
}
.vr-printguard-missing-item::before {
  content: '•';
  position: absolute;
  left: -14px;
  top: 3px;
  color: #dc2626;
  font-weight: 900;
  font-size: 18px;
  line-height: 1;
}
html[data-vr-theme="light"] .vr-printguard-missing-item::before { color: #b91c1c; }

.vr-printguard-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
  margin-top: 12px;
}
@media (max-width: 480px) {
  .vr-printguard-actions { flex-direction: column-reverse; }
  .vr-printguard-actions .vr-printguard-btn { width: 100%; }
}

.vr-printguard-btn {
  appearance: none;
  border: 1px solid var(--border, #333);
  background: transparent;
  color: inherit;
  padding: 8px 14px;
  border-radius: 8px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, transform .05s ease;
}
.vr-printguard-btn:hover  { background: rgba(255, 255, 255, .06); }
.vr-printguard-btn:active { transform: translateY(1px); }
.vr-printguard-btn:focus-visible {
  outline: 2px solid var(--accent, #32e875);
  outline-offset: 2px;
}

/* Cancel = primary CTA (safer default) */
.vr-printguard-cancel {
  background: var(--accent, #32e875);
  border-color: var(--accent, #32e875);
  color: #0b1f13;
}
.vr-printguard-cancel:hover { filter: brightness(1.08); background: var(--accent, #32e875); }
html[data-vr-theme="light"] .vr-printguard-cancel {
  background: #2563eb;
  border-color: #1d4ed8;
  color: #ffffff;
}
html[data-vr-theme="light"] .vr-printguard-cancel:hover { background: #1d4ed8; filter: none; }

/* Proceed = secondary / warning — muted style, not the eye-catcher */
.vr-printguard-proceed {
  background: transparent;
  color: inherit;
  opacity: .8;
}
.vr-printguard-proceed:hover { background: rgba(255, 255, 255, .06); opacity: 1; }
html[data-vr-theme="light"] .vr-printguard-proceed {
  background: #f1f5f9;
  border-color: #cbd8ea;
  color: #64748b;
}
html[data-vr-theme="light"] .vr-printguard-proceed:hover {
  background: #e2e8f0;
  color: #334155;
}

/* Highlight pulse applied to first missing field after "Cancel" */
.vr-printguard-highlight {
  animation: vr-printguard-pulse 2s ease-out;
  outline-offset: 2px;
}
@keyframes vr-printguard-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(245, 158, 11, .8); outline: 2px solid #f59e0b; }
  50%  { box-shadow: 0 0 0 8px rgba(245, 158, 11, 0); outline: 2px solid #f59e0b; }
  100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); outline: 2px solid transparent; }
}