/**
 * consentimientos.css
 * Horaly v5.55.0
 * Estilos para gestión de formatos de consentimiento
 */

/* ============================================
   Tabla de formatos
   ============================================ */
#consent-table {
  font-size: 0.875rem;
}

#consent-table thead th {
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  color: #6c757d;
  border-bottom: 2px solid #dee2e6;
}

#consent-table tbody tr:hover {
  background-color: rgba(var(--bs-primary-rgb), 0.04);
}

#consent-table td {
  vertical-align: middle;
  padding: 0.625rem 0.75rem;
}

/* Botones de acción en tabla (estilo íconos inline como presupuestos) */
#consent-table .btn-action {
  background: none;
  border: none;
  padding: 0.25rem 0.4rem;
  color: #6c757d;
  cursor: pointer;
  transition: color 0.15s ease;
}

#consent-table .btn-action:hover {
  color: #0d6efd;
}

#consent-table .btn-action.btn-edit:hover {
  color: #0d6efd;
}

#consent-table .btn-action.btn-view:hover {
  color: #6c757d;
}

#consent-table .btn-action.btn-duplicate:hover {
  color: #198754;
}

#consent-table .btn-action.btn-delete:hover {
  color: #dc3545;
}

#consent-table .btn-action i {
  font-size: 1rem;
}

/* ============================================
   Badges tipo/firma
   ============================================ */
#consent-table .badge {
  font-weight: 500;
  font-size: 0.7rem;
  padding: 0.35em 0.65em;
}

/* ============================================
   Modal editor
   ============================================ */
#modal-consent-form .modal-body {
  max-height: 75vh;
  overflow-y: auto;
}

/* CKEditor container */
#consent-editor {
  min-height: 300px;
}

.ck-editor__editable {
  min-height: 280px !important;
  max-height: 400px !important;
}

/* Variables panel */
#variables-list code {
  font-size: 0.8rem;
  background: transparent;
}

#variables-list .bg-light {
  border: 1px solid #e9ecef;
}

#variables-list small {
  font-size: 0.7rem;
}

/* ============================================
   Modal preview
   ============================================ */
.consent-preview-container {
  padding: 1.5rem;
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 0.375rem;
  font-size: 0.9rem;
  line-height: 1.6;
}

.consent-preview-container h1,
.consent-preview-container h2,
.consent-preview-container h3 {
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

.consent-preview-container h1 {
  font-size: 1.5rem;
}

.consent-preview-container h2 {
  font-size: 1.25rem;
}

.consent-preview-container h3 {
  font-size: 1.1rem;
}

.consent-preview-container p {
  margin-bottom: 0.75rem;
}

.consent-preview-container ul,
.consent-preview-container ol {
  margin-bottom: 0.75rem;
  padding-left: 1.5rem;
}

.consent-preview-container table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
}

.consent-preview-container table td,
.consent-preview-container table th {
  border: 1px solid #dee2e6;
  padding: 0.5rem;
}

/* Highlight para variables [COMPLETAR] */
.consent-preview-container .marker-yellow,
.consent-preview-container mark {
  background-color: #fdfd77;
  padding: 0.1em 0.2em;
}

/* ============================================
   Estados vacío/cargando
   ============================================ */
#consent-empty i {
  opacity: 0.4;
}

#consent-loading {
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============================================
   Cards Mobile
   ============================================ */
.hl-consent-card .hl-action-icon {
  background: none;
  border: none;
  padding: 4px 6px;
  color: #6b7280;
  cursor: pointer;
  font-size: 0.9rem;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}

.hl-consent-card .hl-action-icon:hover {
  color: #111827;
  background: #f3f4f6;
}

.hl-consent-card .hl-action-delete:hover {
  color: #991b1b;
  background: #fef2f2;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 767.98px) {
  #consent-table {
    font-size: 0.8rem;
  }

  #consent-table td,
  #consent-table th {
    padding: 0.5rem;
  }

  #consent-table .btn-sm {
    padding: 0.2rem 0.4rem;
  }

  .consent-preview-container {
    padding: 1rem;
    font-size: 0.85rem;
  }
}