/* ===== 🎨 formulario de busqueda Principal ===== */
.agilis-search-wrapper {
  max-width: 1000px;
  margin: 2rem auto;
  padding: 2rem;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.05);
  font-family: "Segoe UI", sans-serif;
}

.agilis-heading {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  color: #2d2d2d;
  text-align: center;
}

.agilis-form-modern {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  align-items: flex-end;
}

.agilis-form-group {
  flex: 1 1 220px;
  display: flex;
  flex-direction: column;
}

.agilis-form-group label {
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #333;
}

.agilis-form-group select,
.agilis-form-group input {
  padding: 0.7rem 0.9rem;
  border: 1px solid #ccc;
  border-radius: 10px;
  font-size: 0.95rem;
  background: #fdfdfd;
}

.agilis-submit button {
  background: #3f51b5;
  color: #fff;
  font-weight: bold;
  border: none;
  padding: 0.8rem 1.5rem;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.agilis-submit button:hover {
  background:  #3f51b5;
}

/* ===== 🚍 TARJETAS DE VIAJES - resutado de la busqueda===== */

.agilis-resultados-modern {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.agilis-viaje-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  padding: 1.5rem;
  display: flex; /* CAMBIO CLAVE */
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
  border: 1px solid #ddd;
  position: relative;
}

.agilis-viaje-header {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 1.5rem;
  justify-content: space-between;
}

.agilis-bus-img {
  flex: 0 0 100px;
}

.agilis-bus-img img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.agilis-viaje-info {
  flex: 2;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.agilis-viaje-info h4 {
  margin: 0;
  color: #1e88e5;
  font-size: 1.1rem;
}

.agilis-viaje-info p {
  margin: 0;
  font-size: 0.92rem;
  color: #444;
}

.agilis-info-final {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.agilis-precio {
  font-size: 1.2rem;
  font-weight: bold;
  color: #43aa8b;
  margin-bottom: 0.5rem;
}

.agilis-btn-reservar {
  background: #3f51b5;
  color: white;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}

.agilis-btn-reservar:hover {
  background: #2c387e;
}

/* ===== 💺 MAPA DE BUTACAS ===== */
.agilis-mapa-container {
  grid-column: 1 / -1;
  margin-top: 1rem;
  background: #f9f9f9;
  padding: 1.5rem;
  border: 1px solid #ddd;
  border-radius: 10px;
}

.agilis-mapa-bus-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.agilis-bus-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 1rem;
}

.agilis-bus-row {
  display: flex;
  gap: 6px;
  justify-content: center;
}

.agilis-seat {
  width: 42px;
  height: 42px;
  line-height: 42px;
  text-align: center;
  border-radius: 6px;
  font-weight: bold;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.agilis-seat.ocupado {
  background: #ccc;
  color: #999;
  cursor: not-allowed;
}

.agilis-seat.libre {
  background: #4caf50;
  color: white;
  cursor: pointer;
}

.agilis-seat.seleccionada {
  background: #f72585;
  color: white;
  border: 2px solid #ffb3d1;
}

.agilis-seat.pasillo {
  background: transparent !important;
  border: none;
  pointer-events: none;

}

/* ===== ✅ Resumen y butacas ===== */
.agilis-resumen-container {
  margin-top: 2rem;
  background: #fdfdfd;
  padding: 1.5rem;
  border: 1px solid #ddd;
  border-radius: 10px;
}

.agilis-resumen-container h4 {
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.agilis-resumen-container table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
}

.agilis-resumen-container th,
.agilis-resumen-container td {
  border: 1px solid #ccc;
  padding: 0.5rem;
  text-align: center;
  font-size: 0.9rem;
}

.agilis-resumen-container button {
  padding: 0.3rem 0.6rem;
  background: #d61c6c;
  border: none;
  color: white;
  border-radius: 6px;
  cursor: pointer;
}

/* ===== ⚠️ MENSAJES ===== */
.agilis-alert.agilis-empty {
  background: #ffefef;
  padding: 10px;
  border: 1px solid #dd3c3c;
  border-radius: 5px;
  color: #dd3c3c;
  margin-top: 1rem;
}

/* ===== 📱 RESPONSIVE ===== */
@media screen and (max-width: 768px) {
  .agilis-viaje-card {
    flex-direction: column;
    text-align: center;
  }

  .agilis-viaje-header {
    flex-direction: column;
    text-align: center;
  }

  .agilis-info-final {
    margin-top: 1rem;
  }

  .agilis-btn-reservar {
    width: 100%;
  }
}

/* ===== 🎫 Formulario Sillas (Resumen) ===== */
.agilis-tabla-resumen input {
  width: 90%;
  padding: 4px;
  border-radius: 4px;
  border: 1px solid #ccc;
  font-size: 0.9rem;
}

.agilis-tabla-resumen button.quitar-silla {
  background: #e53935;
  color: white;
  border: none;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
}

.agilis-total {
  text-align: right;
  margin-top: 0.5rem;
  font-size: 1.1rem;
}

.agilis-confirmar {
  display: block;
  margin: 1rem 0 0 auto;
  background: #1e88e5;
  color: white;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
}

.agilis-confirmar:hover {
  background: #1565c0;
}


/* ===== 📱 Responsive para tabla de resumen ===== */
@media screen and (max-width: 768px) {
  .agilis-tabla-resumen {
    border: 0;
    width: 100%;
    display: block;
    overflow-x: auto;
  }

  .agilis-tabla-resumen thead {
    display: none;
  }

  .agilis-tabla-resumen tr {
    display: block;
    margin-bottom: 1rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 0.5rem;
    background: #fff;
  }

  .agilis-tabla-resumen td {
    display: flex;
    justify-content: space-between;
    padding: 0.4rem 0.5rem;
    border: none;
    border-bottom: 1px solid #eee;
    font-size: 0.95rem;
  }

  .agilis-tabla-resumen td:last-child {
    border-bottom: none;
  }

  .agilis-tabla-resumen td::before {
    content: attr(data-label);
    font-weight: bold;
    color: #444;
    flex: 1;
  }

  .agilis-tabla-resumen input[type="text"],
  .agilis-tabla-resumen input[type="tel"] {
    flex: 2;
    margin-left: 1rem;
    font-size: 0.95rem;
  }

  .agilis-confirmar {
    width: 100%;
    font-size: 1rem;
    padding: 0.9rem;
  }

  .agilis-total {
    text-align: center;
    font-size: 1.1rem;
    margin-top: 1rem;
  }
}

/**adicionado**/

@media screen and (max-width: 768px) {
  .agilis-tabla-resumen input[type="text"],
  .agilis-tabla-resumen input[type="tel"] {
    padding: 12px 10px;
    font-size: 1rem;
    height: 48px;
    border-radius: 8px;
  }

  .agilis-tabla-resumen td {
    padding: 10px;
  }

  .agilis-tabla-resumen td::before {
    font-size: 0.95rem;
  }

  .agilis-confirmar {
    font-size: 1rem;
    padding: 12px;
    width: 100%;
  }
}

/***--*/

@media screen and (max-width: 768px) {
  .agilis-tabla-resumen input[type="text"],
  .agilis-tabla-resumen input[type="tel"] {
    width: 100%;
    padding: 10px;
    font-size: 1rem;
    min-height: 42px;
    border-radius: 6px;
    box-sizing: border-box;
  }

  .agilis-tabla-resumen td {
    display: block;
    width: 100%;
    padding: 6px 0;
    border: none;
    border-bottom: 1px solid #eee;
  }

  .agilis-tabla-resumen tr {
    display: block;
    margin-bottom: 1.5rem;
    border: 1px solid #ccc;
    border-radius: 10px;
    padding: 10px;
    background: #fff;
  }

  .agilis-tabla-resumen td[data-label]::before {
    content: attr(data-label) ": ";
    font-weight: bold;
    display: inline-block;
    width: 100%;
    margin-bottom: 4px;
    color: #333;
  }

  .agilis-tabla-resumen thead {
    display: none;
  }

  .agilis-total {
    text-align: right;
    font-size: 1.1rem;
    padding-top: 1rem;
  }

  .agilis-confirmar {
    width: 100%;
    padding: 12px;
    font-size: 1rem;
    border-radius: 8px;
    background: #1e88e5;
  }
}
