/* Estilos generales para la ventana emergente */
#shortcode-in-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  padding: 20px;
  border: 1px solid #ccc;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  z-index: 9999;
  width: 500px;
  max-width: 90%;
  font-family: Arial, sans-serif;
}

/* Botón dashicon */
.mce-i-shortcode-icon:before {
  font-family: dashicons !important;
  content: "\f150"; /* código del dashicon */
  font-size: 20px;
}

/* Overlay detrás de la ventana emergente */
#shortcode-in-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9998;
}

/* Título de la ventana emergente */
#shortcode-in-popup h3 {
  margin-bottom: 10px;
}

/* Campo de entrada para nuevos shortcodes */
#new-shortcode-input {
  flex: 1; /* Permite que el campo de entrada use el espacio disponible */
  padding: 8px;
  margin-right: 10px; /* Espacio entre el campo y el botón */
  box-sizing: border-box;
}

/* Contenedor para el campo de entrada y el botón */
#shortcode-input-container {
  display: flex; /* Usa flexbox para alinear horizontalmente */
  align-items: center; /* Alinea verticalmente los elementos */
}

/* Botones dentro de la ventana emergente */
#shortcode-in-popup button {
  cursor: pointer;
  border: none;
  border-radius: 3px;
  color: #fff;
}

/* Botón Añadir */
#add-new-shortcode {
  padding: 8px 12px;
  margin-left: 0; /* Elimina margen innecesario */
  background-color: #28a745;
}
#add-new-shortcode:hover {
  background-color: #218838;
}

/* Botón Cerrar */
#close-popup {
  position: sticky;
  bottom: 100%;
  left: 95%;
  background-color: #dc3545;
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 16px;
  padding: 5px 10px;
  border-radius: 3px;
}
#close-popup:hover {
  background-color: #c82333;
}

/* Boton gestor shortodes */

#settings-button span:before {
  content: '\f111';
  font-family: dashicons;
  font-size: 20px;
  width: 20px;
  height: 20px;
  line-height: 1;
  display: inline-block;
  vertical-align: middle;
}

#settings-button {
  background: none;
  color: #000 !important;
  border: none;
  cursor: pointer;
  padding: 0 0 0 5px;
}

h4 {
  display: flex;
  align-items: center;
}

/* Contenedor de previsualización */
#preview-container {
  display: inline-block;
  vertical-align: middle;
  margin-left: 10px;
  margin-top: 10px;
  border: 1px solid #ccc;
  padding: 5px;
  background-color: #f9f9f9;
  min-width: 150px;
  height: auto;
  font-size: 12px;
  line-height: 1.5;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

#preview-container strong {
  color: #000;
  font-weight: bold;
}

/* Espacio botones de la ventana emergente */
#shortcode-buttons-preview {
  padding: 10px;
}

/* Contenedor de shortcodes almacenados */
#stored-shortcodes-container {
  background-color: #333;
  color: #fff;
  padding: 10px;
  margin-bottom: 10px;
}

/* Lista de shortcodes almacenados */
#stored-shortcodes-list {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 150px;
  overflow-y: auto;
}
#stored-shortcodes-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px;
  border-bottom: 1px solid #ddd;
}
#stored-shortcodes-list span {
  flex: 1;
}
#stored-shortcodes-list button {
  background-color: #007bff;
  color: #fff;
  border: none;
  padding: 5px 10px;
  cursor: pointer;
  border-radius: 3px;
  margin-left: 10px;
}
#stored-shortcodes-list button:hover {
  background-color: #0056b3;
}

/* Paginación */
#pagination-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
#prev-page,
#next-page {
  background-color: #007bff;
  color: #fff;
  border: none;
  padding: 5px 10px;
  cursor: pointer;
  border-radius: 3px;
}
#prev-page {
  margin-right: 5px;
}
#prev-page:hover,
#next-page:hover {
  background-color: #0056b3;
}
#prev-page:disabled,
#next-page:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

/* Números de página */
#page-numbers {
  flex-grow: 1;
  text-align: center;
}
#page-numbers button {
  background-color: #f8f9fa;
  color: #000;
  border: 1px solid #ddd;
  padding: 5px 10px;
  cursor: pointer;
  border-radius: 3px;
  margin: 0 5px;
}
#page-numbers button.active {
  background-color: #007bff;
  color: #fff;
  border-color: #007bff;
}
#page-numbers button:hover:not(.active) {
  background-color: #e9ecef;
}

/* PAGINA SETTINGS */

.shortcode-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.shortcode-add-section,
.shortcode-search-section {
  width: 48%; /* Ajusta el ancho según sea necesario */
}

.shortcode-add-section h3,
.shortcode-search-section h3 {
  margin-bottom: 5px;
}
