/* ==========================================================================
   METSUR CRM — Corrector Ortográfico Incorporado
   Estilos para el panel interactivo y burbuja flotante de ortografía
   ========================================================================== */

/* Burbuja flotante mientras se escribe */
.ort-pop {
  position: fixed;
  z-index: 99999;
  background: #ffffff;
  color: #333c47;
  border: 1px solid #c9d8e5;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(15, 163, 216, 0.15), 0 2px 6px rgba(0, 0, 0, 0.1);
  padding: 10px 12px;
  font-family: inherit;
  font-size: 12.5px;
  line-height: 1.4;
  animation: ortFadeIn 0.15s ease-out;
  pointer-events: auto;
}

@keyframes ortFadeIn {
  from { opacity: 0; transform: translateY(-3px); }
  to { opacity: 1; transform: translateY(0); }
}

.ort-tit {
  font-weight: 700;
  font-size: 11.5px;
  color: #0b79a6;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #eef2f4;
  padding-bottom: 5px;
}

.ort-tit span {
  font-weight: 600;
  color: #e0403b;
  background: #ffe6e5;
  border-radius: 10px;
  padding: 1px 7px;
  font-size: 11px;
}

.ort-fila {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 0;
  border-bottom: 1px dashed #eef2f4;
}

.ort-fila:last-of-type {
  border-bottom: none;
}

.ort-mal {
  color: #e0403b;
  text-decoration: line-through;
  background: #ffe6e5;
  padding: 1px 5px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 12px;
}

.ort-bien {
  color: #3f7000;
  background: #eef8d3;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 700;
}

.ort-fila button, .ort-pie button {
  background: #ffffff;
  border: 1px solid #dfe5e9;
  border-radius: 5px;
  padding: 3px 8px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  color: #0b79a6;
  transition: all 0.12s ease;
}

.ort-fila button:hover, .ort-pie button:hover {
  background: #e3f6fd;
  border-color: #0fa3d8;
}

.ort-pie {
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid #eef2f4;
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.ort-pie .ort-primario {
  background: #0fa3d8;
  color: #ffffff;
  border-color: #0fa3d8;
}

.ort-pie .ort-primario:hover {
  background: #0b79a6;
  border-color: #0b79a6;
}

/* Botón flotante "✨ Revisar ortografía" en textareas */
.ort-btn-revisar {
  display: none !important;
}

/* Envoltura para campos con botón incorporado */
.ort-wrap-campo {
  position: relative;
  display: block;
}

/* Modal del Panel Interactivo del Corrector */
.ort-modal-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ort-modal-texto {
  background: #f8fafc;
  border: 1px solid #dfe5e9;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 13.5px;
  line-height: 1.6;
  max-height: 160px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.ort-modal-texto mark.ort-hl {
  background: #ffdbda;
  color: #a81c17;
  padding: 2px 4px;
  border-radius: 4px;
  font-weight: 600;
  border-bottom: 2px solid #e0403b;
}

.ort-sugerencias-lista {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 260px;
  overflow-y: auto;
  padding-right: 4px;
}

.ort-tarjeta-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  border: 1px solid #dfe5e9;
  border-left: 4px solid #0fa3d8;
  border-radius: 6px;
  padding: 9px 12px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.ort-tarjeta-item.tipo-marca {
  border-left-color: #8a3ffc;
}

.ort-tarjeta-item.tipo-acento {
  border-left-color: #0fa3d8;
}

.ort-tarjeta-item.tipo-ortografia {
  border-left-color: #e0403b;
}

.ort-tarjeta-info {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.ort-tarjeta-categoria {
  font-size: 10.5px;
  text-transform: uppercase;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: #eef2f4;
  color: #5a6472;
}

.ort-tarjeta-acciones {
  display: flex;
  gap: 6px;
}

.ort-btn-accion {
  border: 1px solid #dfe5e9;
  background: #ffffff;
  border-radius: 5px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.12s ease;
}

.ort-btn-accion.corregir {
  background: #5f8f00;
  color: #ffffff;
  border-color: #5f8f00;
}

.ort-btn-accion.corregir:hover {
  background: #4a6f00;
}

.ort-btn-accion.ignorar {
  color: #7b8591;
}

.ort-btn-accion.ignorar:hover {
  background: #eef2f4;
}

.ort-estado-ok {
  text-align: center;
  padding: 24px 16px;
  color: #5f8f00;
}

.ort-estado-ok svg {
  width: 44px;
  height: 44px;
  margin-bottom: 8px;
}
