/* ================================
   FORMULARIO: Panel estilizado
   ================================ */

.form-nuevo-cliente {
  width: 95%;
  max-width: 1100px;
  margin: 60px auto;
  padding: 0 10px;
  font-family: 'Segoe UI', sans-serif;
}

.form-nuevo-cliente .form-card {
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}

.form-nuevo-cliente .form-card__header {
  background: #2C3E50;   /* azul petróleo oscuro */
  padding: 20px 30px;
  text-align: center;
}

.form-nuevo-cliente .form-card__header h2 {
  margin: 0;
  font-size: 1.8rem;
  color: #ECF0F1;         /* gris muy claro */
  font-weight: 600;
}

/* Grid de campos */
.form-nuevo-cliente .acf-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px 32px;
  padding: 30px;
}

/* Ajustes de cada campo */
.form-nuevo-cliente .acf-field {
  margin: 0 !important;
}

.form-nuevo-cliente .acf-label label {
  font-size: 0.95rem;
  font-weight: 600;
  color: #2C3E50;
  margin-bottom: 6px;
  display: block;
}

/* Inputs modernos */
.form-nuevo-cliente .acf-input input,
.form-nuevo-cliente .acf-input select,
.form-nuevo-cliente .acf-input textarea {
  width: 100%;
  padding: 14px 16px;
  font-size: 0.95rem;
  border: 1px solid #BDC3C7;
  border-radius: 6px;
  background: #fdfdfd;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-nuevo-cliente .acf-input input:focus,
.form-nuevo-cliente .acf-input select:focus,
.form-nuevo-cliente .acf-input textarea:focus {
  border-color: #18BC9C;   /* verde azulado */
  box-shadow: 0 0 0 3px rgba(24, 188, 156, 0.15);
  outline: none;
}

/* Botón de envío grande y centrado */
.form-nuevo-cliente .acf-form-submit {
  grid-column: 1 / -1;
  text-align: center;
  padding-bottom: 30px;
}

.form-nuevo-cliente .acf-submit-button {
  background: #18BC9C;    /* verde azulado */
  color: #fff;
  padding: 14px 32px;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
}

.form-nuevo-cliente .acf-submit-button:hover {
  background: #15A589;    /* verde mar oscuro */
}

/* 1. Aseguramos que la tarjeta sea contenedor relativo */
.form-nuevo-cliente .form-card {
  position: relative;
}

/* 2. Estilos actualizados para el mensaje de éxito */
.form-nuevo-cliente .form-card .notification--success {
  /* Anulamos absolute y transform heredados */
  position: static;        /* quita absolute */
  transform: none;         /* quita cualquier translate */
  
  /* Centramos el bloque */
  display: block;          
  margin: 16px auto 32px;  /* 16px arriba, auto centrado, 32px abajo */
  max-width: 80%;          /* no demasiado ancho */
  text-align: center;      
}


@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-5px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   PAGE CLIENTES - CONTENEDOR
   ========================================================================== */
.page-clientes {
  width: 95%;
  max-width: 1200px;
  margin: 50px auto 100px;
  font-family: 'Segoe UI', sans-serif;
  color: #374151;
}

/* ==========================================================================
   NOTIFICACIÓN DE ÉXITO
   ========================================================================== */
.page-clientes .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-clientes h1 {
  font-size: 2.4rem;
  margin-bottom: 16px;
  color: #1f2937;
}

/* ==========================================================================
   CONTROLES (EXPORTAR + BUSCAR + FILTRAR)
   ========================================================================== */
.page-clientes .controls {
  display: flex;
  flex-wrap: nowrap;        /* forzamos una sola fila */
  gap: 12px;
  align-items: center;
  margin-bottom: 24px;
  overflow-x: auto;         /* scroll horizontal si falta espacio */
  padding-bottom: 4px;      /* pequeño padding para el scroll */
}

.page-clientes .controls .button,
.page-clientes .controls button {
  flex-shrink: 0;
  background: #3c3c47;
  color: #fff;
  padding: 10px 18px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  transition: background 0.2s;
}

.page-clientes .controls .button:hover,
.page-clientes .controls button:hover {
  background: #2e2e38;
}

.page-clientes .controls input[type="text"],
.page-clientes .controls select {
  flex: 1 1 150px;         /* ocupan espacio, pero mínimo 150px */
  min-width: 120px;        /* un tope inferior */
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 0.95rem;
}

/* ==========================================================================
   WRAPPER DE LA TABLA
   ========================================================================== */
.page-clientes .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-clientes table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.95rem;
}

/* Zebra striping y hover */
.page-clientes tbody tr:nth-child(even) {
  background-color: #f9fafb;
}
.page-clientes tbody tr:hover {
  background-color: #eef4f8;
  transition: background 0.15s;
}

/* Bordes suaves entre celdas */
.page-clientes th,
.page-clientes td {
  padding: 12px 15px;
  border: none;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
}
.page-clientes thead th {
  border-bottom: 2px solid #cbd5e0;
}
.page-clientes tbody tr:last-child td {
  border-bottom: none;
}

/* Sticky header para la tabla */
.page-clientes thead th {
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 2;
}

/* Encabezados */
.page-clientes thead th {
  font-weight: 600;
  text-transform: uppercase;
  color: #2c3e50;
}

/* Celdas */
.page-clientes td {
  color: #4b5563;
}

/* ==========================================================================
   ENLACES Y BOTONES DE ACCIÓN
   ========================================================================== */
.page-clientes a {
  color: #18bc9c;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}
.page-clientes a:hover {
  color: #15a589;
}

/* Botón “Eliminar” en línea */
.page-clientes 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-clientes td form button:hover {
  background: #c0392b;
}




/* ==================================================
   OVERRIDE SITE-CONTENT SOLO EN EDITAR Y VER CLIENTE
   ================================================== */

/* 1) Aplica sólo a la plantilla “Editar Cliente” */
body.page-template-page-editar-cliente .site-content,
/* 2) Y sólo a la plantilla “Ver Cliente” (single-cliente.php) */
body.single-cliente .site-content {
  display: block !important;    /* quita el flex */
  width: 100% !important;       /* ocupa todo el contenedor padre */
  padding: 0 !important;        /* elimina padding extra si lo hubiera */
}

/* ==================================================
   ESTILOS DE LA TARJETA (ya los tenías, repítelos aquí)
   ================================================== */
.single-cliente .cliente-card,
.page-template-page-editar-cliente .cliente-card {
  max-width: 720px;
  margin: 40px auto;                  /* centrado horizontal, algo de margen arriba */
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.08);
  overflow: hidden;
}

/* Cabecera oscura */
.single-cliente .cliente-card__header,
.page-template-page-editar-cliente .cliente-card__header {
  background: #2d3a49;
  padding: 24px 16px;
  text-align: center;
}
.single-cliente .cliente-card__header h1,
.page-template-page-editar-cliente .cliente-card__header h1 {
  margin: 0;
  color: #fff;
  font-size: 1.75rem;
  line-height: 1.2;
}

/* Cuerpo de tarjeta */
.single-cliente .cliente-card__body,
.page-template-page-editar-cliente .cliente-card__body {
  padding: 20px 24px 32px;
}

/* Notificación */
.single-cliente .notification--success,
.page-template-page-editar-cliente .notification--success {
  background: #e6f9f2;
  border: 1px solid #18bc9c;
  color: #04633d;
  border-radius: 6px;
  padding: 14px 20px;
  display: inline-block;
  margin-bottom: 24px;
}

/* Grid de campos */
.single-cliente .editar-cliente__form-wrapper,
.page-template-page-editar-cliente .editar-cliente__form-wrapper {
  display: grid;
  grid-template-columns: repeat(2,1fr);
  gap: 32px 24px;
}
.single-cliente .editar-cliente__form-wrapper .acf-field,
.page-template-page-editar-cliente .editar-cliente__form-wrapper .acf-field {
  margin-bottom: 24px;
}

/* Labels e inputs */
.single-cliente .editar-cliente__form-wrapper .acf-label label,
.page-template-page-editar-cliente .editar-cliente__form-wrapper .acf-label label {
  font-weight: 600;
  color: #2d3a49;
}
.single-cliente .editar-cliente__form-wrapper .acf-input input,
.single-cliente .editar-cliente__form-wrapper .acf-input select,
.page-template-page-editar-cliente .editar-cliente__form-wrapper .acf-input input,
.page-template-page-editar-cliente .editar-cliente__form-wrapper .acf-input select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #f7f8fa;
}

/* Línea separadora */
.single-cliente .editar-cliente__form-wrapper hr,
.page-template-page-editar-cliente .editar-cliente__form-wrapper hr {
  border: 0;
  border-top: 1px solid #e0e0e0;
  margin: 32px 0;
}

/* Botón */
.single-cliente .acf-form-submit input[type="submit"],
.page-template-page-editar-cliente .acf-form-submit input[type="submit"] {
  background: #2d3a49;
  color: #fff;
  padding: 12px 24px;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
}
.single-cliente .acf-form-submit input[type="submit"]:hover,
.page-template-page-editar-cliente .acf-form-submit input[type="submit"]:hover {
  background: #24303d;
}

/* Responsive */
@media (max-width: 700px) {
  .single-cliente .cliente-card,
  .page-template-page-editar-cliente .cliente-card {
    width: 90%;
  }
  .single-cliente .editar-cliente__form-wrapper,
  .page-template-page-editar-cliente .editar-cliente__form-wrapper {
    grid-template-columns: 1fr;
  }
}









/* Responsive menor */
@media (max-width: 600px) {
  .form-nuevo-cliente .acf-fields {
    grid-template-columns: 1fr;
  }
}
