/* ---------------------------- RESET GENERAL ---------------------------- */
* {
  box-sizing: border-box;
}

/* ------------------------ MODAL Y SCROLL CROQUIS ------------------------ */
#modalBodyVerCroquis {
  max-width: 100%;
  padding: 15px;
  background-color: #ffffff;
  border-radius: 8px;
  overflow-x: auto;
  white-space: nowrap;
}

#modalBodyVerCroquis::-webkit-scrollbar {
  height: 10px;
  background: transparent;
}

#modalBodyVerCroquis::-webkit-scrollbar-thumb {
  background-color: #007bff;
  border-radius: 5px;
  border: 2px solid white;
}

#modalBodyVerCroquis::-webkit-scrollbar-thumb:hover {
  background-color: #0056b3;
}

/* ------------------------ CONTENEDOR GENERAL PISOS ------------------------ */
#croquisContainer {
  display: flex;
  gap: 200px;
  align-items: flex-start;
  padding: 44px 0;
  min-width: max-content;
}

.piso-container {
  display: grid;
  gap: 10px;
  padding: 20px;
  background-color: white;
  grid-template-columns: repeat(auto-fill, minmax(48px, 1fr));
  position: relative;
}

/* ------------------------ TÍTULOS DE PISOS ------------------------ */
#asientos1Container::before,
#asientos2Container::before {
  content: attr(data-title);
  position: absolute;
  left: 18px;
  top: 50%;
  transform: rotate(-90deg) translateY(-50%);
  transform-origin: left center;
  font-size: 16px;
  font-weight: bold;
  color: white;
  background-color: orange;
  padding: 5px 10px;
  border-radius: 5px;
  white-space: nowrap;
}

/* ------------------------ CONTENEDORES DE ASIENTOS ------------------------ */
#asientos1Container,
#asientos2Container {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  justify-content: flex-start;
  width: auto;
  height: auto;
}

.asientoContainer {
  width: 48px;
  height: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.asiento {
  width: 95%;
  height: 95%;
  border-radius: 5px;
  position: relative;
  cursor: pointer;
}

/* ------------------------ ESTADOS DE ASIENTOS ------------------------ */
.asiento.libre {
  background: #28c76f url(/static/img/asientolibre.png) no-repeat center;
  background-size: 30px 30px;
}

.asiento.libre:hover {
  background-color: #1e7e34 !important;
}

.asiento.reservado {
  background-color: #33d9ed !important;
  position: relative;
}

.asiento.reservado::before {
  content: '';
  background: url(/static/img/asientoreservado.png) no-repeat;
  background-size: 30px 30px;
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-30%);
  width: 30px;
  height: 30px;
}

.asiento.reservado:hover {
  background-color: #1e7e34 !important;
}

.asiento.ocupado-hombre {
  background: hsl(214, 67%, 47%) url(/static/img/asientovaron.png) no-repeat center;
  background-size: 30px 30px;
}

.asiento.ocupado-mujer {
  background: hsl(214, 67%, 47%) url(/static/img/asientomujer.png) no-repeat center;
  background-size: 30px 30px;
}

.asiento.bloqueado {
  background-color: #005c00 !important;
  position: relative;
}

.asiento.bloqueado::after {
  content: '';
  background: url(/static/img/bloqueado.png) no-repeat;
  background-size: 20px 20px;
  position: absolute;
  bottom: 5px;
  right: 5px;
  width: 20px;
  height: 20px;
}

.asiento.bloqueado:hover {
  background-color: #003f00 !important;
}

.asiento span {
  position: absolute;
  top: 2px;
  left: 7%;
  color: white;
  font-size: 10px !important;
  font-family: Arial;
  font-weight: 500;
}

/* ------------------------ ESPECIALES (TV, PASADIZO, ESCALERA) ------------------------ */
.asiento.libre.tv {
  width: 60%;
  height: 100%;
  background: transparent center/80% url(/static/img/tv.png) no-repeat !important;
  transform: none;
}

.asiento.libre.tv > span,
.asiento.libre.pasadizo,
.asiento.libre.escalera {
  display: none;
}

/* ------------------------ LAYOUTS POR TIPO DE UNIDAD ------------------------ */
.piso-container.buses-dos-pisos #asientos1Container {
  max-height: 300px;
}

.piso-container.embarcacion #asientos1Container,
.piso-container.embarcacion #asientos2Container {
  max-height: none;
  grid-template-columns: repeat(auto-fill, minmax(48px, 1fr));
}

/* ------------------------ RESPONSIVE: MÓVILES ------------------------ */
@media screen and (max-width: 767px) {
  #croquisContainer {
    flex-direction: column;
    gap: 30px;
    align-items: center;
    padding: 10px 10px;
    min-width: unset;
    width: 100%;
  }

  #asientos1Container,
  #asientos2Container {
    flex-direction: column; /* Aseguramos el flujo de asientos de arriba hacia abajo */
    align-items: center;
    width: 100%;
    max-width: 100%;
    transform: none; /* Eliminar el reflejo en X */
  }

  .filaAsientos {
    display: flex;
    flex-direction: row; /* Aseguramos que las filas sean horizontales */
    justify-content: center;
    gap: 10px;
    width: 100%;
  }

  #asientos1Container::before,
  #asientos2Container::before {
    position: relative;
    display: block;
    transform: none;
    margin-bottom: 10px;
    text-align: center;
    background-color: orange;
    color: white;
    padding: 5px 15px;
    font-size: 14px;
    border-radius: 5px;
  }
}

/* ------------------------ RESPONSIVE: PC ------------------------ */
@media screen and (min-width: 768px) {
  #croquisContainer {
    display: flex;
    gap: 100px;
    align-items: flex-start;
    padding: 4px 0;
    min-width: max-content;
  }

  #asientos1Container,
  #asientos2Container {
    flex-direction: row; /* En PC, mantener asientos en fila horizontal */
    align-items: flex-start;
    justify-content: flex-start;
  }

  .asientoContainer {
    width: 70px;
    height: 40px;
  }

  .asiento span {
    top: 5px;
    left: 20%;
    font-size: 13px !important;
  }
}

.filaAsientos{
  display:flex;
  flex-direction:row;
  gap:10px;
  width:100%;
  justify-content:flex-start;
}
