/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */
.reveal-audio {
  animation: revealFromMic 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.hide-audio {
  animation: hideToMic 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes revealFromMic {
  from {
    clip-path: circle(0% at calc(100% - 60px) calc(100% - 24px));
    opacity: 0;
  }
  to {
    clip-path: circle(150% at calc(100% - 60px) calc(100% - 24px));
    opacity: 1;
  }
}

@keyframes hideToMic {
  from {
    clip-path: circle(150% at calc(100% - 60px) calc(100% - 24px));
    opacity: 1;
  }
  to {
    clip-path: circle(0% at calc(100% - 60px) calc(100% - 24px));
    opacity: 0;
  }
}

/* DOCX tag-review preview */
.docx-preview-host {
  position: relative;
  overflow: auto;
  cursor: grab;
  user-select: none;
  overscroll-behavior: contain;
}

.docx-preview-host.is-panning {
  cursor: grabbing;
}

.docx-preview-host .docx-preview-fit {
  position: relative;
  overflow: hidden;
}

.docx-preview-host .docx-wrapper {
  background: transparent !important;
  padding: 12px !important;
  gap: 0.75rem;
  width: max-content !important;
  max-width: none !important;
  transform-origin: top left;
  will-change: transform;
}

.docx-preview-host .docx-wrapper > section.docx {
  width: 210mm !important;
  min-width: 210mm !important;
  max-width: 210mm !important;
  min-height: 297mm !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.12) !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  margin-bottom: 1rem !important;
}

.docx-preview-host .docx-wrapper > section.docx > article {
  max-width: 100% !important;
  overflow: hidden !important;
}

/* Tables must fit the A4 page, not expand it */
.docx-preview-host table {
  border-collapse: collapse;
  border-spacing: 0;
  width: 100% !important;
  max-width: 100% !important;
  table-layout: fixed !important;
}

.docx-preview-host td,
.docx-preview-host th {
  padding: revert-layer;
  border-style: solid;
  vertical-align: top;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal !important;
  overflow: hidden;
}

.docx-preview-host img {
  max-width: 100% !important;
  height: auto;
}

.docx-preview {
  font-family: "Georgia", "Times New Roman", serif;
  line-height: 1.55;
  color: #1e293b;
}

.docx-preview .docx-p {
  margin: 0 0 0.75rem;
  min-height: 1.25em;
}

.docx-preview .docx-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.75rem 0 1rem;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.875rem;
}

.docx-preview .docx-td {
  border: 1px solid #cbd5e1;
  padding: 0.5rem 0.75rem;
  vertical-align: top;
}

.docx-preview .docx-td .docx-p {
  margin-bottom: 0.35rem;
}

.docx-preview .docx-td .docx-p:last-child {
  margin-bottom: 0;
}

.docx-preview .tag-highlight,
.docx-preview-host .tag-highlight {
  background: #fef3c7;
  color: #78350f;
  border-radius: 0.25rem;
  padding: 0 0.2rem;
  font-weight: 600;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.85em;
  cursor: pointer;
}

.docx-preview .tag-highlight:hover,
.docx-preview-host .tag-highlight:hover {
  background: #fde68a;
}

.tag-review-card.is-selected {
  border-color: #0f172a;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.12);
}
