.jellybean-modal {
  position: fixed;
  top: 0; 
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  background: rgba(0,0,0,0.7);
  z-index: 100;
  overflow: visible;
}

.jellybean-modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.jellybean-modal__container {
  position: relative;
  height: fit-content;
  margin: 1rem;
  width: min(52rem, calc(100vw - 2rem));
}

.jellybean-modal__content {
  background: #fff;
  width: 100%;
  max-height: 82vh;
  overflow-x: hidden;
  overflow-y: auto;
}

.jellybean-modal__content .new-vehicles-jellybean-navigation {
  width: 100%;
  max-height: none;
  overflow-y: visible;
}

.jellybean-modal__content .vehicle-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, 10rem);
  justify-content: flex-start;
  gap: 2rem 1rem;
}

.jellybean-modal__content .nav-jellybean {
  margin: 0;
  width: 100%;
}

.jellybean-modal__content .nav-jellybean__img {
  width: 80%;
  aspect-ratio: 2;
}

.jellybean-modal__content .nav-jellybean__link {
  align-items: center;
  text-align: center;
  min-width: 0;
}

.jellybean-modal__content .nav-jellybean__title {
  display: block;
  min-width: 0;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  overflow-wrap: normal;
  text-overflow: ellipsis;
}

.jellybean-modal__content .nav-jellybean .d-flex {
  display: flex;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 0 0.25rem;
  width: 100%;
  min-width: 0;
}

.jellybean-modal__content .nav-jellybean__starting-price {
  width: 100%;
}

.jellybean-modal__content .vehicle-category__title {
  text-align: center;
  background-color: var(--main-nav--jellybean-mobile-background);
  color: var(--main-nav--jellybean-mobile-text-color);
  border-color: var(--main-nav--jellybean-mobile-background);
  font-size: 1rem;
  font-weight: 500;
}

.jellybean-modal__all-inventory-link {
  text-align: center;
  margin-top: 1.5rem;
  font-weight: bold;
  font-size: 1.1rem;
}

.jellybean-modal__all-inventory-link > a {
  color: var(--main-nav--jellybean-text-color);
}

.jellybean-modal__close {
  position: absolute;
  top: -13%;
  right: 0.5rem;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: none;
  border: 2px solid white;
  font-size: 1.75rem;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  z-index: 1001;
}

@media only screen and (max-width: 880px) {
  .jellybean-modal__close {
    top: 0.5rem;
    right: 0.5rem;
    color: #111;
    background: #fff;
    border-color: #111;
  }

  .jellybean-modal__content {
    padding-top: 3.5rem;
  }

  .jellybean-modal__all-inventory-link {
    margin-top: 0;
  }
}

@media only screen and (max-width: 480px) {
  .jellybean-modal__content .vehicle-category__group {
    padding: 1rem 0.75rem;
  }

  .jellybean-modal__content .vehicle-tiles {
    justify-content: center;
    gap: 1.5rem 0.75rem;
  }
}

@media only screen and (max-width: 385px) {
  .jellybean-modal__content .vehicle-category__group {
    padding: 1rem 0;
  }

  .jellybean-modal__content .vehicle-tiles {
    gap: 1.5rem 0.5rem;
  }
}
