/* ======================================================================== */
/* ── Ditado por voz ──────────────────────────────────────────────────────── */
/* ======================================================================== */

.dict-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 14px;
  border-bottom: 1px solid #2a2a2e;
  flex-shrink: 0;
}

.dict-pulse {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff3b3b;
  flex-shrink: 0;
  animation: dictPulse 1.4s ease infinite;
}
.dict-pulse.paused {
  background: #666;
  animation: none;
  box-shadow: none;
}
@keyframes dictPulse {
  0%   { box-shadow: 0 0 0 0 rgba(255,59,59,.75); }
  70%  { box-shadow: 0 0 0 10px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.dict-status {
  flex: 1;
  font-weight: 600;
  font-size: 13px;
}

.dict-close-btn {
  background: transparent;
  border: 0;
  color: #888;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 2px 4px;
  border-radius: 4px;
}
.dict-close-btn:hover { color: #f5f5f5; background: rgba(255,255,255,.08); }

.dict-transcript {
  padding: 12px 14px;
  overflow-y: auto;
  flex: 1;
  min-height: 80px;
  max-height: 260px;
  line-height: 1.5;
  font-size: 13.5px;
  word-break: break-word;
}

.dict-final  { color: #f0f0f0; }
.dict-interim { color: #888; font-style: italic; }

.dict-actions {
  display: flex;
  gap: 6px;
  padding: 10px 12px;
  border-top: 1px solid #2a2a2e;
  flex-shrink: 0;
}

.dict-btn {
  flex: 1;
  padding: 7px 10px;
  background: #2a2a2e;
  color: #f0f0f0;
  border: 1px solid #3a3a3e;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-family: inherit;
  white-space: nowrap;
  transition: background .15s;
}
.dict-btn:hover { background: #33333a; }

.dict-btn-primary {
  background: #00d4ff !important;
  color: #0a0a0c !important;
  border-color: #00d4ff !important;
  font-weight: 600 !important;
}
.dict-btn-primary:hover { background: #00bfe8 !important; border-color: #00bfe8 !important; }

.dict-processing {
  padding: 28px 20px;
  text-align: center;
  color: #aaa;
  font-size: 13px;
}

.dict-spinner {
  width: 30px;
  height: 30px;
  border: 3px solid rgba(0,212,255,.2);
  border-top-color: #00d4ff;
  border-radius: 50%;
  margin: 0 auto 14px;
  animation: dictSpin .85s linear infinite;
}
@keyframes dictSpin { to { transform: rotate(360deg); } }

.dict-error {
  padding: 18px 16px;
  color: #f0f0f0;
  white-space: pre-wrap;
  font-size: 13px;
}
.dict-error strong { color: #ff7676; display: block; margin-bottom: 8px; }
.dict-error p { color: #ccc; margin: 0 0 12px; line-height: 1.5; }

/* ── Modal de revisão ───────────────────────────────────────────────────── */
.dict-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.65);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.dict-modal {
  background: #161618;
  color: #f0f0f0;
  width: min(700px, 92vw);
  max-height: 88vh;
  border: 1px solid #2a2a2e;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: inherit;
  font-size: 13px;
}

.dict-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid #2a2a2e;
  flex-shrink: 0;
}
.dict-modal-header h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}
.dict-modal-close {
  background: transparent;
  border: 0;
  color: #888;
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 4px;
}
.dict-modal-close:hover { color: #f0f0f0; background: rgba(255,255,255,.08); }

.dict-modal-body {
  overflow-y: auto;
  flex: 1;
  padding: 4px 0;
}

.dict-transcript-detail {
  margin: 12px 18px;
  padding: 10px 12px;
  background: #0e0e10;
  border-radius: 8px;
  font-size: 12px;
  color: #9aa0a6;
}
.dict-transcript-detail summary {
  cursor: pointer;
  font-weight: 500;
  color: #cfd8dc;
  margin-bottom: 2px;
}
.dict-transcript-detail p { margin: 8px 0 0; line-height: 1.5; }

.dict-modal-section {
  padding: 8px 18px 14px;
}
.dict-modal-section h4 {
  margin: 10px 0 8px;
  font-size: 13px;
  color: #cfd8dc;
  font-weight: 600;
}

.dict-warn-section  { border-left: 3px solid #e8c14d; padding-left: 15px; }
.dict-muted-section { color: #9aa0a6; }
.dict-muted-section ul { margin: 4px 0; padding-left: 18px; }
.dict-muted-section li { margin-bottom: 4px; line-height: 1.4; }

.dict-hint  { font-size: 12px; color: #888; margin: 0; }
.dict-empty { color: #888; font-style: italic; font-size: 12px; }

/* Cartão de match */
.dict-match {
  background: #1c1c1f;
  border: 1px solid #2a2a2e;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 8px;
}
.dict-match-incompleto { opacity: .75; }

.dict-match-head {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  flex-wrap: wrap;
}
.dict-match-head strong { font-size: 13px; }

.dict-match-toggle {
  flex-shrink: 0;
  width: 15px;
  height: 15px;
  cursor: pointer;
  accent-color: #00d4ff;
}

.dict-match-quote {
  color: #9aa0a6;
  font-style: italic;
  font-size: 12px;
  margin: 6px 0 8px;
  line-height: 1.4;
}

.dict-match-slots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
}
.dict-match-slots label {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 11px;
  color: #9aa0a6;
}
.dict-match-slots input {
  background: #0e0e10;
  color: #f0f0f0;
  border: 1px solid #2a2a2e;
  border-radius: 5px;
  padding: 5px 7px;
  font-size: 12.5px;
  font-family: inherit;
  width: 100%;
  box-sizing: border-box;
}
.dict-match-slots input:focus {
  outline: none;
  border-color: #00d4ff;
}

/* Badges de confiança */
.dict-badge {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 10px;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: .03em;
  flex-shrink: 0;
}
.dict-badge-success { background: #0e3a26; color: #5fd8a5; }
.dict-badge-warn    { background: #3a2e0e; color: #e8c14d; }
.dict-badge-danger  { background: #3a1010; color: #ff8b8b; }
.dict-badge-muted   { background: #2a2a2e; color: #999; }

/* Footer do modal */
.dict-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 18px;
  border-top: 1px solid #2a2a2e;
  flex-shrink: 0;
}
.dict-modal-footer .dict-btn {
  flex: 0;
  padding: 8px 18px;
  font-size: 13px;
}

/* Dark-mode host already uses dark background; light-mode overrides */
.page-medico-dashboard:not(.dark-mode) .dict-modal {
  background: #1e1e22;  /* mantém dark para os overlays mesmo em light mode */
}
