/* «Procesar documento» (static/document-processing.js): botón en la fila de acciones del adjunto,
   con el mismo estilo que «Descargar» (.attachment-action en style.css), y ventanita
   «Documento procesado». Mismos colores que style.css. */

.doc-popup { position:fixed; z-index:60; width:min(380px,calc(100vw - 16px)); max-height:calc(100vh - 16px);
  overflow:auto; padding:12px 14px; border:1px solid #dce0e6; border-radius:10px; background:#fff;
  color:#242a34; box-shadow:0 10px 28px rgba(24,28,36,.18); font-size:13px; line-height:1.4; }
.doc-popup:focus { outline:none; }
.doc-popup:focus-visible { outline:2px solid #3d75cc; outline-offset:2px; }
.doc-popup-header { display:flex; align-items:center; justify-content:space-between; gap:8px; margin:0 0 6px; }
.doc-popup-title { margin:0; font-size:14px; font-weight:700; color:#1f2630; }
.doc-popup-x { flex:none; width:26px; height:26px; padding:0; border:0; border-radius:6px; background:transparent;
  color:#62636b; font-size:18px; font-weight:400; line-height:1; }
.doc-popup-x:hover { background:#eef0f3; color:#242a34; filter:none; }
.doc-popup-disclaimer { margin:0 0 10px; padding:6px 9px; border-radius:7px; background:#fff4dc;
  color:#7a5200; font-size:12px; font-weight:600; }
.doc-popup-body { display:grid; gap:10px; }
.doc-popup-section h3 { margin:0 0 4px; font-size:11px; font-weight:700; letter-spacing:.02em;
  text-transform:uppercase; color:#6b6f78; }
.doc-popup-section p, .doc-popup-body > p { margin:0; overflow-wrap:anywhere; }
.doc-popup-what { font-weight:600; }
.doc-range { list-style:none; margin:0; padding:0; display:grid; gap:6px; }
.doc-range-line { display:flex; flex-wrap:wrap; align-items:baseline; gap:2px 8px; }
.doc-range-arrow { flex:none; font-size:11px; width:12px; text-align:center; }
.doc-range-alto { color:#c00000; }
.doc-range-bajo { color:#2864c5; }
.doc-range-param { font-weight:650; }
.doc-range-value { font-variant-numeric:tabular-nums; }
.doc-range-ref, .doc-range-note { color:#6b6f78; font-size:12px; }
.doc-range-note { margin:1px 0 0 20px !important; }
.doc-popup-quote { margin:0 0 4px; padding:5px 9px; border-left:3px solid #b9cbe9; background:#f6f8fc;
  border-radius:0 7px 7px 0; white-space:pre-wrap; overflow-wrap:anywhere; }
.doc-popup-list { margin:0; padding-left:18px; }
.doc-popup-list li { margin:0 0 2px; overflow-wrap:anywhere; }
.doc-popup-refer { padding:6px 9px; border-radius:7px; background:#eef2fa; color:#1f3f75; }
.doc-popup-state { font-weight:650; }
.doc-popup-problem { color:#7a5200; }
.doc-popup-pages { margin:0; }
.doc-popup-actions { position:sticky; bottom:-12px; display:flex; justify-content:flex-end; flex-wrap:wrap; gap:8px;
  margin:12px -14px -12px; padding:8px 14px 12px; background:#fff; }
.doc-popup-actions button { padding:6px 11px; font-size:12px; }

/* Móvil: hoja inferior a todo lo ancho. */
.doc-popup.doc-popup-sheet { left:0; right:0; bottom:0; top:auto; width:auto; max-height:75vh;
  border-radius:12px 12px 0 0; border-bottom:0; padding:14px 16px calc(14px + env(safe-area-inset-bottom)); }
@media (max-width:640px) {
  .doc-popup { left:0 !important; right:0; bottom:0; top:auto !important; width:auto !important; max-height:75vh;
    border-radius:12px 12px 0 0; border-bottom:0; }
}
