/* Quote Wiki: hover preview and citation popup.
   Kept separate from site.css so a rebuild that copies shared CSS
   cannot drop these rules, and so the file can be cache-busted on its own. */

.quote-index-table { width: 100%; }
.quote-preview {
  cursor: help;
  border-bottom: 1px dotted var(--gold, #c4a35a);
}
.quote-preview.is-expanded {
  cursor: default;
  white-space: normal;
}
.quote-row.is-verified,
.quote-row.is-verified .status-verified,
.quote-entry.is-verified .status-verified,
.quote-slide.is-verified .status-verified {
  cursor: pointer;
}
.quote-row.is-verified:hover,
.quote-entry.is-verified:hover {
  background: #f7f1e3;
}
.quote-row.is-verified:focus-visible,
.quote-preview:focus-visible,
.status-verified:focus-visible {
  outline: 2px solid var(--gold, #c4a35a);
  outline-offset: 2px;
}
.quote-hover-hint {
  font-size: 0.95rem;
  font-style: italic;
  color: var(--ink-soft, #5c5346);
  margin: 0.4rem 0 1rem;
}

.quote-tooltip {
  position: fixed !important;
  z-index: 200;
  display: none;
  max-width: min(36rem, calc(100vw - 1.5rem));
  background: var(--card, #fbf6ea);
  color: var(--ink, #2a2418);
  border: 1px solid var(--gold, #c4a35a);
  box-shadow: 0 6px 24px rgba(42, 36, 24, 0.22);
  padding: 0.75rem 0.9rem;
  font-family: var(--serif, Georgia, "Times New Roman", serif);
  font-size: 1.02rem;
  line-height: 1.45;
  pointer-events: none;
  user-select: none;
}
.quote-tooltip.is-visible { display: block !important; }
.quote-tooltip p { margin: 0; }

.quote-modal-backdrop {
  position: fixed !important;
  inset: 0 !important;
  z-index: 300;
  background: rgba(28, 24, 16, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  box-sizing: border-box;
}
.quote-modal-backdrop.is-open,
.quote-modal-backdrop:not([hidden]) {
  display: flex !important;
}
.quote-modal-backdrop[hidden] {
  display: none !important;
}
.quote-modal {
  position: relative;
  background: var(--card, #fbf6ea);
  color: var(--ink, #2a2418);
  border: 1px solid var(--gold, #c4a35a);
  box-shadow: 0 8px 32px rgba(28, 24, 16, 0.35);
  max-width: 560px;
  width: 100%;
  max-height: min(86vh, 36rem);
  overflow: auto;
  padding: 2.1rem 1.25rem 1.25rem;
  box-sizing: border-box;
  -webkit-overflow-scrolling: touch;
}
.quote-modal,
.quote-modal blockquote,
.quote-modal .slide-speaker,
.quote-modal .slide-cite,
.quote-modal .evidence-note {
  user-select: text;
  -webkit-user-select: text;
}
.quote-modal-close {
  position: absolute;
  top: 0.45rem;
  right: 0.5rem;
  background: var(--card, #fbf6ea);
  border: 1px solid var(--gold, #c4a35a);
  color: var(--navy, #1b2a4a);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  width: 2rem;
  height: 2rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.quote-modal-close:hover,
.quote-modal-close:focus-visible {
  color: var(--burgundy, #7a1f2b);
  border-color: var(--burgundy, #7a1f2b);
  outline: none;
}
.quote-modal .slide-kicker {
  margin: 0 0 0.45rem;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--navy, #1b2a4a);
}
.quote-modal blockquote {
  margin: 0.3rem 0 0.8rem;
  padding: 0 0 0 0.9rem;
  border-left: 3px solid var(--gold, #c4a35a);
  font-size: 1.12rem;
  line-height: 1.45;
}
.quote-modal .slide-speaker {
  font-weight: 600;
  color: var(--navy, #1b2a4a);
  margin: 0 0 0.35rem;
}
.quote-modal .slide-cite {
  font-size: 0.98rem;
  font-style: italic;
  color: var(--ink-soft, #5c5346);
  margin: 0 0 0.7rem;
  overflow-wrap: anywhere;
}
.quote-modal .evidence-note { margin: 0 0 1rem; }
.quote-modal .copy-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}
.quote-modal .copy-status {
  font-size: 0.95rem;
  color: #1e3d2b;
  min-height: 1.2em;
}

body.quote-modal-open { overflow: hidden; }

@media (max-width: 600px) {
  .quote-modal {
    max-height: min(92vh, 40rem);
    padding: 2.15rem 1rem 1rem;
  }
  .quote-tooltip {
    max-width: calc(100vw - 1rem);
  }
}
