/* ========================================================================== 
   PAGE CONTACTOS - DESHABILITA EL FLEX DE GP EN ESTA PLANTILLA 
   ========================================================================== */
.page-template-page-contactos .site-content {
  display: block !important;
}

/* ========================================================================== 
   PAGE CONTACTOS - CONTENEDOR 
   ========================================================================== */
.page-template-page-contactos .page-contactos {
  width: 95%;
  max-width: 1200px;
  margin: 50px auto 100px;
  font-family: 'Segoe UI', sans-serif;
  color: #374151;
}

/* ========================================================================== 
   NOTIFICACIÓN DE ÉXITO 
   ========================================================================== */
.page-template-page-contactos .notification--success {
  display: block;
  max-width: 600px;
  margin: 0 auto 24px;
  padding: 12px 20px;
  background-color: #e6f9f2;
  border: 1px solid #18bc9c;
  color: #04633d;
  border-radius: 6px;
  font-size: 0.95rem;
  text-align: center;
  animation: slideIn 0.3s ease-out;
}

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

/* ========================================================================== 
   ENCABEZADO 
   ========================================================================== */
.page-template-page-contactos .page-contactos h1 {
  font-size: 2.4rem;
  margin-bottom: 16px;
  color: #1f2937;
}

/* ========================================================================== 
   CONTROLES (BUSCAR + FILTRAR) 
   ========================================================================== */
.page-template-page-contactos .controls {
  display: flex;
  flex-wrap: nowrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 24px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.page-template-page-contactos .controls input[type="text"],
.page-template-page-contactos .controls select {
  flex: 1 1 150px;
  min-width: 120px;
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 0.95rem;
}

.page-template-page-contactos .controls button {
  flex-shrink: 0;
  background: #3c3c47;
  color: #fff;
  padding: 10px 18px;
  border-radius: 6px;
  font-weight: 500;
  transition: background 0.2s;
  border: none;
  cursor: pointer;
}
.page-template-page-contactos .controls button:hover {
  background: #2e2e38;
}

/* ========================================================================== 
   WRAPPER DE LA TABLA 
   ========================================================================== */
.page-template-page-contactos .table-wrap {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
  overflow: hidden;
  margin-top: 24px;
}

/* ========================================================================== 
   ESTILOS DE LA TABLA 
   ========================================================================== */
.page-template-page-contactos .table-wrap table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.95rem;
}

/* Zebra striping y hover */
.page-template-page-contactos .table-wrap tbody tr:nth-child(even) {
  background-color: #f9fafb;
}
.page-template-page-contactos .table-wrap tbody tr:hover {
  background-color: #eef4f8;
  transition: background 0.15s;
}

/* Bordes suaves entre celdas */
.page-template-page-contactos .table-wrap th,
.page-template-page-contactos .table-wrap td {
  padding: 12px 15px;
  border: none;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
}
.page-template-page-contactos .table-wrap thead th {
  border-bottom: 2px solid #cbd5e0;
}

/* Quitar border en última fila */
.page-template-page-contactos .table-wrap tbody tr:last-child td {
  border-bottom: none;
}

/* Sticky header */
.page-template-page-contactos .table-wrap thead th {
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 2;
  font-weight: 600;
  text-transform: uppercase;
  color: #2c3e50;
}

/* Celdas */
.page-template-page-contactos .table-wrap td {
  color: #4b5563;
}

/* ========================================================================== 
   ENLACES Y BOTONES DE ACCIÓN 
   ========================================================================== */
.page-template-page-contactos .table-wrap td a {
  color: #18bc9c;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}
.page-template-page-contactos .table-wrap td a:hover {
  color: #15a589;
  text-decoration: underline;
}

/* Botón “Eliminar” */
.page-template-page-contactos .table-wrap td form button {
  background: #e74c3c;
  color: #fff;
  padding: 6px 12px;
  border: none;
  border-radius: 5px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s;
}
.page-template-page-contactos .table-wrap td form button:hover {
  background: #c0392b;
}

/* ========================================================================== 
   RESPONSIVE 
   ========================================================================== */
@media (max-width: 700px) {
  /* Mantén esto como ya lo tienes */
  .page-template-page-contactos .controls {
    flex-direction: column;
    align-items: stretch;
  }
  .page-template-page-contactos .controls input[type="text"],
  .page-template-page-contactos .controls select,
  .page-template-page-contactos .controls button {
    flex: 1 1 auto;
    width: 100%;
  }
  .page-template-page-contactos .table-wrap th,
  .page-template-page-contactos .table-wrap td {
    padding: 10px 8px;
    font-size: 0.8125rem;
  }

  /* Añade esto NUEVO */
  .page-template-page-contactos .table-wrap {
    overflow-x: auto;
  }

  .page-template-page-contactos .table-wrap table {
    min-width: 600px;
    width: max-content;
  }
}

