/* Sumeria — estilos del bloque de Firma Electrónica
   Convive con style.css (Bootstrap). Solo selectores del bloque nuevo. */

/* ── Zona radio (urbana / rural) ─────────────────────────────── */
.zona-radio-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
@media (min-width: 576px) {
  .zona-radio-group { flex-direction: row; gap: 0.75rem; }
}
.zona-radio-option {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border: 1.5px solid #ced4da;
  border-radius: 0.5rem;
  cursor: pointer;
  background: #fff;
  transition: border-color 0.15s ease, background-color 0.15s ease;
  margin: 0;
}
.zona-radio-option:hover { border-color: #066aab; background: #f0f7fd; }
.zona-radio-option input[type="radio"] {
  accent-color: #066aab;
  width: 18px;
  height: 18px;
  margin: 0;
}
.zona-radio-option small { color: #6c757d; }

/* ── Sección firma ───────────────────────────────────────────── */
.firma-instruccion {
  color: #495057;
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}

.firma-resumen {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 0.5rem;
  padding: 0.85rem 1rem;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
}
.firma-resumen dl {
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.25rem 1rem;
}
@media (min-width: 576px) {
  .firma-resumen dl {
    grid-template-columns: max-content 1fr;
    gap: 0.35rem 1rem;
  }
}
.firma-resumen dt {
  font-weight: 600;
  color: #6c757d;
  font-size: 0.82rem;
}
.firma-resumen dd { margin: 0; color: #212529; }

.firma-clausulas {
  margin-bottom: 0.75rem;
  border: 1px solid #dee2e6;
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: #fff;
}
.firma-clausulas summary {
  cursor: pointer;
  color: #066aab;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.25rem 0;
}
.firma-clausulas-body {
  padding-top: 0.5rem;
  font-size: 0.85rem;
  line-height: 1.5;
  color: #212529;
}
.firma-clausulas-body p { margin: 0.4rem 0; }
.firma-legal-note {
  margin-top: 0.75rem !important;
  padding-top: 0.5rem;
  border-top: 1px dashed #dee2e6;
  color: #6c757d;
  font-style: italic;
  font-size: 0.8rem;
}

/* ── Checkboxes legales ──────────────────────────────────────── */
.firma-checkboxes {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.firma-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.75rem;
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1.4;
  background: #fff;
  border: 1px solid #dee2e6;
  margin: 0;
  transition: background-color 0.15s ease;
}
.firma-checkbox:hover { background: #f0f7fd; }
.firma-checkbox input[type="checkbox"] {
  margin-top: 2px;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: #066aab;
}
.firma-checkbox small { color: #6c757d; }

/* ── Canvas firma ────────────────────────────────────────────── */
.firma-canvas-wrap {
  margin-top: 0.5rem;
}
.firma-canvas-box {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 6;
  max-height: 180px;
  background: #fff;
  border: 2px dashed #066aab;
  border-radius: 0.5rem;
  overflow: hidden;
  cursor: crosshair;
  transition: border-color 0.15s ease, border-style 0.15s ease;
}
.firma-canvas-box.is-signed {
  border: 2px solid #25d366;
  border-style: solid;
}
.firma-canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  background: #fff;
}
.firma-canvas-placeholder {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #adb5bd;
  font-size: 1rem;
  pointer-events: none;
  font-style: italic;
}
.firma-canvas-placeholder.is-hidden { display: none; }

.firma-canvas-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.firma-status {
  font-size: 0.85rem;
  color: #6c757d;
}
.firma-status.is-ok {
  color: #1eb558;
  font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
  .firma-canvas-box, .firma-checkbox, .zona-radio-option {
    transition: none !important;
  }
}
