.editor-container {
  margin-bottom: 1rem;
}

.editor-wrapper {
  position: relative;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fff;
}

.sticky-top-60 {
  position: sticky;
  top: 60px;
  z-index: 1020; /* mismo valor que sticky-top en Bootstrap */
}

/* Toolbar en página normal */
.editor-toolbar.sticky-top {
  top: 60px; /* offset cuando no está en modal */
}

/* Toolbar dentro de un modal */
.modal .editor-toolbar.sticky-top {
  top: 0; /* en modal se pega arriba sin offset extra */
}

.editor-toolbar {
   display: flex;
  

  
  align-items: center;
 
  padding: 0;
  border-bottom: 1px solid #ccc;
  background-color: #f0f0f0;
  z-index: 999999999;
  overflow: hidden;
}




.editor-toolbar .dropdown-menu {
  position: fixed !important;
  z-index: 99999 !important;
}

.toolbar-buttons {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 4px;
  overflow: hidden;
  flex: 1 1 auto;
  min-width: 0;
}

.toolbar-overflow {
  flex-shrink: 0;
}

/* === Botones estilo CKEditor === */
.editor-toolbar button,
.editor-toolbar label.btn,
.editor-toolbar .dropdown button {
  appearance: none;
  background: #fff;
  border: 0px solid #bbb;
  color: #333;

  font-size: 0.75rem;
  border-radius: 4px;
  min-width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
  
}
.editor-toolbar button,
.editor-toolbar label.btn,
.editor-toolbar .dropdown button,
.editor-toolbar > * {
  margin: 0 !important;
  padding-left:2px!important;
  padding-right:2px!important;
}

.editor-toolbar > * {
  display: flex;
  align-items: center;
}

.editor-toolbar {
  gap: 0;
}

.editor-toolbar button:hover,
.editor-toolbar label.btn:hover,
.editor-toolbar .dropdown button:hover {
  background: #e6f0ff;
  border-color: #007bff;
  color:#000000;
}

/* === Botón principal === */
.editor-toolbar .btn-primary {
  background-color: #007bff;
  color: white;
  border-color: #007bff;
}
.editor-toolbar .btn-primary:hover {
  background-color: #0056b3;
}

/* === Selector de color === */
.editor-toolbar input[type="color"] {
  border: none;
  padding: 0;
  width: 32px;
  height: 32px;
  cursor: pointer;
  background-color: transparent;
}

/* === Menú desplegable === */
.dropdown-menu {
  border: 1px solid #ccc;
  background-color: #fff;
  padding: 0.5rem;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* === Área editable === */
.html-editor {

  border-bottom:1px solid #000000;
 padding: 12px 12px 0 12px!important; /*top  right  bottom  left */
  background: #fff;
  font-size: 1rem;
  line-height: 1.6;
  outline: none;
  
}

/* === Placeholder (cuando está vacío) === */
.html-editor.empty:empty:before {
  content: attr(data-placeholder);
  color: #aaa;
  font-style: italic;
  pointer-events: none;
}

/* === Estilo para tablas === */
.html-editor table {
  border-collapse: collapse;
  width: 100%;
  margin: 1rem 0;
}

.html-editor th,
.html-editor td {
  border: 1px solid #ccc;
  padding: 8px;
  min-width: 50px;
}

/* === Responsive: pantallas pequeñas === */
@media (max-width: 576px) {
  .editor-toolbar {
    gap: 2px;
    padding: 4px;
  }
  .editor-toolbar button,
  .editor-toolbar label.btn,
  .editor-toolbar .dropdown button {
    font-size: 0.7rem;
    padding: 3px 6px;
    height: 28px;
    min-width: 28px;
  }
}

.inserted-image {
  max-width: 100%;
  cursor: default;
}

.inserted-image.selected {
  outline: 2px dashed #007bff;
  cursor: nwse-resize;
}`;
document.head.appendChild(style);


.html-editor.editable-area[data-placeholder]:empty:before {
  content: attr(data-placeholder);
  color: #aaa;
  pointer-events: none;
  display: block;
}



.html-editor.editable-area.empty:before {
  content: attr(data-placeholder);
  color: #999;
  pointer-events: none;
  display: block;
}


.editor-toolbaru {
  padding: 0px!important;   /* Menor padding vertical y horizontal */
   
}

.editor-toolbaru .btn {
  padding: 0.25rem 0.5rem;   /* Menor padding vertical y horizontal */
  font-size: 0.75rem;        /* Tamaño de fuente más pequeño */
  line-height: 1;            /* Ajuste vertical del texto */
  border-radius: 0.2rem;     /* Bordes ligeramente más redondeados */
}


pre.editor-code-block {
  background: #f8f9fa;
  border: 1px solid #ced4da;
  padding: 0.5rem 0.75rem; /* Reduce espacio interno */
  border-radius: 0.25rem;
  overflow-x: auto;
  font-family: 'Courier New', monospace;
  font-size: 0.875rem;
  margin: 0.5rem 0; /* Espacio externo opcional */
  line-height: 1.4; /* Reduce altura de línea */
}

pre.editor-code-block code {
  display: block;
  white-space: pre-wrap; /* Permite saltos de línea si es necesario */
  word-break: break-word;
  outline: none;
}

pre.editor-code-block,
pre.editor-code-block code {
  margin: 0;
}

 td.selected {
    background-color: #d0ebff !important;
  }

  .table-context-menu {
    position: absolute;
    z-index: 10000;
    background: white;
    border: 1px solid #ccc;
    padding: 5px 0;
    min-width: 150px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    display: none;
  }

  .table-context-menu .context-option {
    padding: 8px 12px;
    cursor: pointer;
  }

  .table-context-menu .context-option:hover {
    background-color: #f1f1f1;
  }
  
  .selected-cell {
  outline: 2px solid #0d6efd !important;
  background-color: #e7f1ff;
}

#table-context-menu {
  cursor: default;
  z-index: 1055;
}

#table-context-menu .dropdown-item {
  cursor: pointer; /* ?? Esto es lo que hace que el mouse cambie a manito */
}

.editor-wrapper {
  position: relative;
  overflow: visible !important;
  width:100%!important;
}



.editor-toolbar .dropdown-menu {
  min-width: 150px;
  font-size: 0.875rem;
  padding: 4px 0;
  z-index: 9999; /* Altísimo para estar encima del editor */
  position: absolute;
}

.editor-toolbar .dropdown-item {
  padding: 4px 12px;
  cursor: pointer;
}


.upload-success-icon {
  position: absolute;
  transform: translate(-22px, 10px); /* Ajusta según imagen */
  background-color: #28a745;
  color: #fff;
  font-size: 13px;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  line-height: 20px;
  text-align: center;
  z-index: 5;
  pointer-events: none;
 
}

@keyframes fadeOut {
  0% { opacity: 1; }
  80% { opacity: 1; }
  100% { opacity: 0; }
}

.file-block {
  display: inline-flex;
  align-items: center;
  gap: 6px;              /* ?? controlas el espacio ENTRE elementos */
  padding: 0 !important; /* ?? quita padding interno */
  margin: 0 !important;  /* ?? quita márgenes del bloque */
  font-size: 0.85rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-sizing: border-box;
}

.file-block > * {
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1 !important; /* ?? evita “altura rara” */
}

.file-block i {
  font-size: 1rem !important; /* ?? baja tamaño de los íconos */
  line-height: 1 !important;
}

.file-block .bx {
  font-size: 1.2rem !important; /* tamaño uniforme de Boxicons */
}

/* AVISOS NUEVAS FUNCIONES Tooltip mejorado */
.custom-hint {
  position: absolute;
  z-index: 9999999999999;
  max-width: 380px;
  background: linear-gradient(135deg, #4e73df, #1cc88a); /* degradado azul a verde */
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0px 6px 18px rgba(0, 0, 0, 0.25);
  transition: all 0.3s ease-in-out;
  animation: fadeInTooltip 0.3s ease;
}

/* Animación al aparecer */
@keyframes fadeInTooltip {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* flechita hacia la izquierda */
.custom-hint::after {
  content: "";
  position: absolute;
  top: -10%;

  right:120px;
  transform: translateY(-50%);
  border-width: 22px;
  border-style: solid;
  border-color: transparent transparent #4e73df transparent; /* tono principal del degradado */
  filter: drop-shadow(0px 2px 4px rgba(0, 0, 0, 0.2));
}


/* ICONOS */
.icono-enlace {
  width: 20px; /* o el tamaño que desees */
  height: 20px;
  background-image: url('/editor/iconos/enlace.png'); /* puede ser .svg, .png, etc. */
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  padding: 0; /* quitar el padding para que se vea bien el icono */
}
.listas-num {
  width: 20px; /* o el tamaño que desees */
  height: 20px;
  background-image: url('/editor/iconos/listas-num.png'); /* puede ser .svg, .png, etc. */
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  padding: 0; /* quitar el padding para que se vea bien el icono */
}
.listas-vi {
  width: 20px; /* o el tamaño que desees */
  height: 20px;
  background-image: url('/editor/iconos/listas-vi.png'); /* puede ser .svg, .png, etc. */
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  padding: 0; /* quitar el padding para que se vea bien el icono */
}
.borrar-formato {
  width: 20px; /* o el tamaño que desees */
  height: 20px;
  background-image: url('/editor/iconos/borrar-formato.png'); /* puede ser .svg, .png, etc. */
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  padding: 0; /* quitar el padding para que se vea bien el icono */
}
.word {
  width: 20px; /* o el tamaño que desees */
  height: 20px;
  background-image: url('/editor/iconos/word.png'); /* puede ser .svg, .png, etc. */
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  padding: 0; /* quitar el padding para que se vea bien el icono */
}
.imagen {
  width: 20px; /* o el tamaño que desees */
  height: 20px;
  background-image: url('/editor/iconos/imagen.png'); /* puede ser .svg, .png, etc. */
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  padding: 0; /* quitar el padding para que se vea bien el icono */
}
.iframe {
  width: 20px; /* o el tamaño que desees */
  height: 20px;
  background-image: url('/editor/iconos/iframe.png'); /* puede ser .svg, .png, etc. */
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  padding: 0; /* quitar el padding para que se vea bien el icono */
}
.codigo {
  width: 20px; /* o el tamaño que desees */
  height: 20px;
  background-image: url('/editor/iconos/codigo.png'); /* puede ser .svg, .png, etc. */
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  padding: 0; /* quitar el padding para que se vea bien el icono */
}

.ver-codigo {
  width: 20px; /* o el tamaño que desees */
  height: 20px;
  background-image: url('/editor/iconos/ver-codigo.png'); /* puede ser .svg, .png, etc. */
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  padding: 0; /* quitar el padding para que se vea bien el icono */
}
.insert-table {
  width: 20px; /* o el tamaño que desees */
  height: 20px;
  background-image: url('/editor/iconos/insert-table.png'); /* puede ser .svg, .png, etc. */
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  padding: 0; /* quitar el padding para que se vea bien el icono */
}
.adjuntar {
  width: 20px; /* o el tamaño que desees */
  height: 20px;
  background-image: url('/editor/iconos/adjuntar.png'); /* puede ser .svg, .png, etc. */
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  padding: 0; /* quitar el padding para que se vea bien el icono */
}
.nube {
  width: 20px; /* o el tamaño que desees */
  height: 20px;
  background-image: url('/editor/iconos/nube.png'); /* puede ser .svg, .png, etc. */
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  padding: 0; /* quitar el padding para que se vea bien el icono */
}
.filemanager {
  width: 20px; /* o el tamaño que desees */
  height: 20px;
  background-image: url('/editor/iconos/filemanager.png'); /* puede ser .svg, .png, etc. */
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  padding: 0; /* quitar el padding para que se vea bien el icono */
}

.emoji {
  width: 20px; /* o el tamaño que desees */
  height: 20px;
  background-image: url('/editor/iconos/emoji.png'); /* puede ser .svg, .png, etc. */
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  padding: 0; /* quitar el padding para que se vea bien el icono */
}

.pdf, .word1, .excel, .powerpoint, .filemanager {
  display: inline-block;
  width: 20px;
  height: 20px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}
.pdf { background-image: url('/editor/iconos/pdf.png'); }
.word1 { background-image: url('/editor/iconos/word1.png'); }
.excel { background-image: url('/editor/iconos/excel.png'); }
.powerpoint { background-image: url('/editor/iconos/powerpoint.png'); }




/* FIN ICONOS cambbio*/

.emoji-item {
    font-family:
      "Segoe UI Emoji",
      "Noto Color Emoji",
      "Apple Color Emoji",
      sans-serif !important;

    font-size: 28px !important;
}