/* ESGPL Search Proxy Plugin Styles */

/* Search Bar & Wrapper */
.esgpl-wrap {
  max-width: 600px;
  margin: 1rem 0;
}
.esgpl-title {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}
.esgpl-bar {
  margin-bottom: 0.5rem;
}
.esgpl-hint {
  font-size: 0.9rem;
  color: #555;
  margin: 0.5rem 0;
}

/* Input field */
.esgpl-input {
  width: 100%;
  padding: 6px 8px;
  box-sizing: border-box;
  border: 1px solid #ccc;
  border-radius: 3px;
}

/* Result Grid and Cards */
.esgpl-grid, .esgpl-cat-grid, .esgpl-ids-grid {
  margin-top: 1rem;
}
.esgpl-card {
  background: #fff;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  margin-bottom: 8px;
  cursor: pointer;
}
.esgpl-card:hover {
  background: #f9f9f9;
}
.esgpl-card-title {
  font-weight: 700;
  margin-bottom: 6px;
}
.esgpl-muted {
  color: #666;
}

/* Pagination */
.esgpl-pager a {
  margin: 0 4px;
  text-decoration: none;
  color: #0073aa;
}
.esgpl-pager a.active {
  font-weight: bold;
  text-decoration: underline;
}

/* Modal Overlay and Content */
.esgpl-modal {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}
.esgpl-modal.is-open {
  display: flex;
}
.esgpl-modal-content {
  background: #fff;
  padding: 1rem;
  border-radius: 4px;
  width: 90%;
  max-width: 450px;
  position: relative;
}
.esgpl-modal-title {
  margin-top: 0;
  margin-bottom: 1rem;
}
/* Close "X" button */
.esgpl-modal-close {
  position: absolute;
  top: 8px;
  right: 12px;
  background: none;
  border: none;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

/* Modal form fields */
.esgpl-form .esgpl-field-group {
  margin-bottom: 0.5rem;
}
.esgpl-form label {
  display: block;
  margin-bottom: 2px;
  font-size: 0.9rem;
  color: #333;
}
.esgpl-cap-input {
  width: 60px;
}

/* Send button */
.esgpl-send-btn {
  background: #0073aa;
  color: #fff;
  border: none;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
  margin-top: 0.5rem;
}
.esgpl-send-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Message text in modal */
.esgpl-msg {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  min-height: 1.2em;
}


/* Fondo del modal */
.esgpl-modal {
  display: none; /* por defecto oculto */
  position: fixed;
  z-index: 99999; /* encima de todo */
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.6); /* fondo gris oscuro translúcido */
}

/* Contenido centrado */
.esgpl-modal-content {
  position: relative;
  background: #fff;
  margin: auto;
  padding: 20px;
  border-radius: 6px;
  width: 90%;
  max-width: 480px;
  top: 50%;
  transform: translateY(-50%); /* centra verticalmente */
  box-shadow: 0 4px 18px rgba(0,0,0,0.3);
}

/* Botón de cerrar */
.esgpl-modal-close {
  position: absolute;
  right: 12px;
  top: 8px;
  border: none;
  background: transparent;
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
}

/* Campos y botones */
.esgpl-input {
  width: 100%;
  padding: 8px 10px;
  margin: 6px 0;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.esgpl-send-btn {
  display: inline-block;
  margin-top: 10px;
  padding: 10px 18px;
  background: #0073aa;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.esgpl-send-btn:hover {
  background: #005f8d;
}

.esgpl-msg {
  margin-top: 10px;
  font-size: 14px;
}
