/*Importar el estilo principal "style.css"*/
@import url('/style.css');

/* ===== Layout general (coherente con tus otras vistas) ===== */
.main-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px;
}

.title {
  padding: 10px;
  margin: -12px;
  text-align: center;
  font-size: 28px;
  font-weight: 800;
  color: #000000;
}

/* ===== Tarjeta tabla + paginador ===== */
.table-card {
  background: #fff;
  border: 1px solid #cfe6fb;
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .06);
  padding: 16px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.data-table thead th {
  text-align: left;
  background: #f0f7ff;
  color: #1f4e79;
  border-bottom: 1px solid #dbeafe;
  padding: 10px 8px;
}

.data-table tbody td {
  border-bottom: 1px solid #eef2f7;
  padding: 10px 8px;
}

.data-table tbody tr {
  cursor: pointer;
}

.data-table tbody tr:hover {
  background: #f7fbff;
}

/* Fila expandida (contenedor debajo de la fila) */
.expanded-row td {
  padding: 12px 8px 16px;
  background: #fbfeff;
}

/* ===== Panel expandido: imagen izquierda + formulario derecho ===== */
.expand-panel {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 16px;
}

.expand-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.expand-img {
  width: 300px;
  height: 220px;
  object-fit: contain;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 6px rgba(0, 0, 0, .08);
}

.btn {
  background: #2d2d2d;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 8px 14px;
  cursor: pointer;
}

.btn.secondary {
  background: #e7f2ff;
  color: #135a92;
  border: 1px solid #9ec9f0;
}

/* Formulatio (mini) al estilo de Crear planta */
.form-card {
  background: #fff;
  border: 1px solid #e6eef6;
  border-radius: 12px;
  padding: 14px;
}

.form-grid {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 10px 14px;
}

.form-label {
  align-self: center;
  font-weight: 600;
  color: #2b2b2b;
}

.form-field {
  width: 100%;
  border: 1px solid #9ec9f0;
  background: #eef7ff;
  border-radius: 8px;
  padding: 8px 10px;
  color: #222;
  box-sizing: border-box;
  height: 36px;
  line-height: 1.2;
}

.form-field[type="text"] {
  height: 36px;
}

select.form-field {
  height: 36px;
}

.form-field:focus {
  outline: none;
  border-color: #2684c7;
  box-shadow: 0 0 0 3px rgba(38, 132, 199, .15);
}

.form-actions {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding-top: 12px;
}

.pager-info {
  font-weight: 600;
}

/* === Buscador tipo "pill" (idéntico a MOSTRAR) === */
.section-search {
  background: transparent;
  padding: 12px;
}

.nav-search {
  position: relative;
  max-width: 700px;
  margin: 0 auto;
}

.nav-search #input-search {
  width: 80%;
  height: 45px;
  padding: 0 75px;
  /* deja espacio para los íconos */
  border: 0;
  border-radius: 999px;
  background: #2f2f2f;
  color: rgb(230, 230, 230);
  text-align: center;
  outline: none;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, .25);
}

.nav-search #input-search::placeholder {
  color: #a8a8a8;
}

#btn-filter,
#btn-search {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #cfe7ff;
  border-radius: 8px;
  cursor: pointer;
}

#btn-filter {
  left: 10px;
}

#btn-search {
  right: 10px;
}

/* En ACTUALIZAR no hay aside de filtros: oculto el botón izquierdo */
#btn-filter {
  display: none;
}


@media (max-width: 860px) {
  .expand-panel {
    grid-template-columns: 1fr;
  }
}

/* Botón de acciones: ocupar todo el ancho del grid y alinear a la derecha */
.form-actions {
  grid-column: 1 / -1;
  /* ← hace que abarque ambas columnas del grid */
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ---- Modal reutilizable ---- */
.modal-overlay[hidden] {
  display: none !important;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .45);
  display: grid;
  place-items: center;
  z-index: 1000;
}

.modal {
  background: #fff;
  min-width: 340px;
  max-width: min(90vw, 560px);
  padding: 18px 20px;
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .25);
  color: #000;
  /* << fuerza texto negro para el mensaje */
}

.modal p {
  margin: 0 0 12px 0;
}

.modal .btn {
  float: right;
}

/* ==== Carrusel (igual a Crear) ==== */
.carousel {
  position: relative;
  width: 100%;
  height: 220px;
  border-radius: 12px;
  overflow: hidden;
  background: #f1f7ff;
}

.carousel-viewport {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.carousel-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform .25s ease-in-out;
}

.carousel-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
}

.carousel-slide img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Flechas */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: #1d1e22;
  color: #fff;
  opacity: .92;
  cursor: pointer;
  z-index: 10;
}

.carousel-prev {
  left: 10px;
}

.carousel-next {
  right: 10px;
}

.carousel-btn:disabled {
  opacity: .35;
  cursor: default;
}

/* X por slide */
.slide-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  background: #f04438;
  color: #fff;
  cursor: pointer;
  z-index: 11;
}

/* ====== Extras (actualizar) ====== */
.extras-block {
  margin-top: 8px;
}

.extras-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  margin: 4px 0;
}

.extras-actions {
  margin-top: 6px;
  display: flex;
  gap: 8px;
}

.extras-empty {
  margin: 4px 0 0 0;
  color: #666;
}

/* ============ Estilos Quill (campo información adicional) ============ */
#quill-editor {
  grid-column: 1 / -1;
  height: 180px;
  background: #fff;
  border: 1px solid #9ec9f0;
  border-radius: 8px;
  box-shadow: inset 0 1px 3px rgba(0,0,0,.05);
}

.ql-toolbar {
  grid-column: 1 / -1;
  border-radius: 8px 8px 0 0;
}

.ql-container {
  border-radius: 0 0 8px 8px;
}
