/* ═══════════════════════════════════════════════════════════════
   adjuntos.css  —  Estilos para adjuntos por línea y firma canvas
   ═══════════════════════════════════════════════════════════════ */

/* ── Celda adjuntos en tabla ────────────────────────────────── */

.adj-cell {
  width: 110px;
  vertical-align: middle;
  padding: 4px 6px;
}

.adj-wrapper {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

/* ── Preview de archivos ────────────────────────────────────── */

.adj-preview {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.adj-item {
  display: flex;
  align-items: center;
  gap: 5px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 3px 7px 3px 5px;
  font-size: 11px;
  max-width: 160px;
}

.adj-thumb {
  width: 28px;
  height: 28px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
  border: 1px solid #e2e8f0;
}

.adj-icon-file {
  font-size: 20px;
  flex-shrink: 0;
  line-height: 1;
}

.adj-nombre {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 85px;
  color: #334155;
  font-size: 11px;
}

.adj-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: #94a3b8;
  font-size: 12px;
  padding: 0 1px;
  flex-shrink: 0;
  line-height: 1;
  transition: color .15s;
}
.adj-remove:hover { color: #ef4444; }

/* ── Input / trigger ────────────────────────────────────────── */

.adj-input-wrap {
  display: flex;
}

.adj-trigger {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  font-size: 12px;
  color: #64748b;
  background: #f1f5f9;
  border: 1px dashed #cbd5e1;
  border-radius: 6px;
  padding: 3px 8px;
  transition: background .15s, border-color .15s;
  user-select: none;
}
.adj-trigger:hover {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #3b82f6;
}

.adj-contador {
  font-size: 10px;
  color: #94a3b8;
}

.adj-hidden {
  display: none;
}

/* ═══════════════════════════════════════════════════════════════
   FIRMA CANVAS
   ═══════════════════════════════════════════════════════════════ */

.firma-wrapper {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 16px;
  background: #f8fafc;
  max-width: 520px;
}

.firma-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.firma-label {
  font-weight: 600;
  font-size: 13px;
  color: #1e293b;
}

.firma-tag-opcional {
  font-size: 10px;
  font-weight: 600;
  color: #64748b;
  background: #e2e8f0;
  padding: 2px 8px;
  border-radius: 99px;
  letter-spacing: .3px;
}

.firma-canvas {
  display: block;
  width: 100%;
  border: 1.5px dashed #cbd5e1;
  border-radius: 8px;
  cursor: crosshair;
  background: #fff;
  touch-action: none;   /* evita scroll al dibujar en móvil */
  box-shadow: inset 0 1px 3px rgba(0,0,0,.04);
  transition: border-color .2s;
}
.firma-canvas:hover,
.firma-canvas:active {
  border-color: #94a3b8;
}

.firma-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
}

.btn-firma-limpiar {
  background: none;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 12px;
  cursor: pointer;
  color: #64748b;
  transition: all .15s;
  font-family: inherit;
}
.btn-firma-limpiar:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #ef4444;
}

.firma-hint {
  font-size: 11px;
  color: #94a3b8;
  font-style: italic;
}

/* ── Modo solo lectura (autorizaciones / vista) ─────────────── */

.firma-canvas.readonly {
  cursor: default;
  pointer-events: none;
  border-style: solid;
  border-color: #e2e8f0;
}

/* ── Sección firma en formularios ───────────────────────────── */

.firma-seccion {
  margin-top: 20px;
}

.firma-seccion-titulo {
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
