/* ============================================================
   SISTEMA DE MODALES ACCESIBLES Y DIÁLOGOS DE CONFIRMACIÓN
   ============================================================ */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(9, 13, 22, 0.8);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.25s;
}

.modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.modal-dialog {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.95) translateY(10px);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-backdrop.active .modal-dialog {
  transform: scale(1) translateY(0);
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.modal-header h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.modal-footer {
  padding: 1.1rem 1.5rem;
  border-top: 1px solid var(--border-color);
  background-color: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* Tabla de atajos en modal */
.shortcuts-table {
  width: 100%;
  border-collapse: collapse;
}

.shortcuts-table tr {
  border-bottom: 1px solid var(--border-color);
}
.shortcuts-table tr:last-child {
  border-bottom: none;
}

.shortcuts-table td {
  padding: 0.65rem 0.5rem;
  font-size: 0.85rem;
}

.kbd-badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color-hover);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Modal de alerta de confirmación con icono de aviso */
.modal-confirm-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--warning-light);
  color: var(--warning);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
}
