/**
 * Styles for Vehicle Single Page
 */

.vehicle-single {
    padding-bottom: 60px;
}

.vehicle-back-to-list {
  display: inline-block;
  margin-bottom: 20px;
}

.vehicle-overview {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
  align-items: flex-start;
}

@media screen and (max-width: 768px) {
    .vehicle-overview {
        grid-template-columns: 1fr;
    }
}

.vehicle-single .vehicle-overview > .wp-block-adwerba-vehicle-consumer-vehicle-detail-gallery {
  flex: 0 1 auto;
  align-self: flex-start;
  width: 100%;
  max-width: 450px;
}

.vehicle-overview-image {
  flex: 0 1 auto;
  align-self: flex-start;
  width: 100%;
  max-width: 450px;
}

.vehicle-overview-image--placeholder img,
.vehicle-overview-image__img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto !important;
  aspect-ratio: auto;
  object-fit: unset;
  object-position: top center;
  background: transparent;
  vertical-align: top;
}

.vehicle-overview-image__trigger {
  position: relative;
  display: grid;
  width: 100%;
  max-width: 100%;
  min-height: 0;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: inherit;
  line-height: 0;
  appearance: none;
  font: inherit;
  color: inherit;
}

.vehicle-overview-image__trigger br {
  display: none;
}

.vehicle-overview-image__trigger > .vehicle-overview-image__img,
.vehicle-overview-image__trigger > .vehicle-overview-image__overlay {
  grid-area: 1 / 1;
}

.vehicle-overview-image__overlay {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0);
  transition: background-color 0.2s ease-in-out;
  pointer-events: none;
}

.vehicle-overview-image__trigger:hover .vehicle-overview-image__overlay,
.vehicle-overview-image__trigger:focus-visible .vehicle-overview-image__overlay {
  background-color: rgba(0, 0, 0, 0.35);
}

.vehicle-overview-image__zoom-icon {
  width: 2.5rem;
  height: 2.5rem;
  color: #fff;
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out;
}

.vehicle-overview-image__trigger:hover .vehicle-overview-image__zoom-icon,
.vehicle-overview-image__trigger:focus-visible .vehicle-overview-image__zoom-icon {
  opacity: 1;
  transform: scale(1);
}

.vehicle-description {
  margin-top: 40px;
}  

.vehicle-gallery {
  position: fixed;
  inset: 0;
  z-index: 100;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s ease-in-out;
  padding: 20px;
  height: 100%;
}

.vehicle-gallery.hidden {
  display: none;
}

.vehicle-gallery .carousel {
  width: min(95vw, 1400px);
  max-width: none;
  max-height: 90vh;
}

.vehicle-gallery .carousel-viewport {
  max-height: 90vh;
}

.vehicle-gallery .carousel-slide img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 90vh;
  object-fit: contain;
}

.vehicle-single .vehicle-overview-details-inner .vehicle-cta-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 300px;
  margin-top: 24px;
}

.vehicle-single .vehicle-overview-details-inner .vehicle-cta-actions .wp-block-button {
  width: 100%;
  max-width: 300px;
  margin: 0;
}

.vehicle-single .vehicle-overview-details-inner .vehicle-cta-actions .wp-block-button__link {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
  font-weight: 500;
}

.vehicle-single .vehicle-overview-details-inner .vehicle-cta-actions .wp-block-button__link br {
  display: none;
}

.vehicle-single .vehicle-overview-details-inner .vehicle-cta-actions .wp-block-button.is-bmw-icon .wp-element-button::before {
  flex-shrink: 0;
  padding-right: 0;
}

.vehicle-gallery-open {
  cursor: pointer;
}

.vehicle-gallery-close {
  position: absolute;
  top: 50px;
  right: 50px;
  z-index: 20;
  width: 30px;
  height: 30px;
  cursor: pointer;
}

.vehicle-gallery .carousel-navigation-previous,
.vehicle-gallery .carousel-navigation-next {
  z-index: 20;
  color: #fff;
  top: 50% !important;
  transform: translateY(-50%) !important;
  position: absolute !important;
  bottom: auto !important;
}

.vehicle-gallery .carousel-navigation-previous {
  left: 0 !important;
}

.vehicle-gallery .carousel-navigation-next {
  right: 0 !important;
}

.vehicle-overview-details {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  flex-grow: 1;
}

@media screen and (min-width: 1904px) {
  .vehicle-overview-details {
    flex-direction: row;
  }
}

.vehicle-overview-details-inner {
  /*flex: 1 1 280px;*/
}

.vehicle-overview-details-inner dl {
  display: grid;
  gap: 0 20px;
  grid-template-columns: max-content auto;
}

.vehicle-overview-details-inner dt {
  grid-column-start: 1;
}

.vehicle-overview-details-inner dd {
  grid-column-start: 2;
  font-weight: 600;
}

.vehicle-dealer-details {
  /*flex: 0 1 280px;*/
  padding: 16px;
  border: 1px solid #e6e6e6;
  border-radius: 4px;
}

.vehicle-dealer-details-title {
  margin: 0 0 12px 0;
  font-size: 1rem;
  font-weight: 600;
}

.vehicle-dealer-details dl {
  display: grid;
  gap: 4px 16px;
  grid-template-columns: max-content 1fr;
  margin: 0;
}

.vehicle-dealer-details dt {
  grid-column-start: 1;
  font-weight: 400;
  font-size: 0.9em;
}

.vehicle-dealer-details dd {
  grid-column-start: 2;
  margin: 0;
  font-weight: 500;
}

.vehicle-dealer-map {
  width: 100%;
  height: 280px;
  margin: 0 0 16px;
  border-radius: 4px;
  overflow: hidden;
  background: #f0f0f0;
}

.vehicle-attributes {
    margin-top: 40px;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0 20px;
}

@media screen and (max-width: 768px) {
   .vehicle-attributes {
        grid-template-columns: 1fr 1fr;
   }
}

@media screen and (max-width: 576px) {
   .vehicle-attributes {
        grid-template-columns: 1fr;
   }
}

.vehicle-attribute {
    display: flex;
    align-items: center;
    padding: 5px 10px;
    gap: 15px;
    height: calc(100% + 1px);
    margin-bottom: -2px;
    border-top: 1px solid #e6e6e6;
    border-bottom: 1px solid #e6e6e6;
}

.vehicle-attribute-content {
    font-weight: 300;
    dt {
        font-size: 14px;
    }
}

.vehicle-highlights {
    margin-top: 40px;
}

.vehicle-extras {
    margin-top: 40px;
}

.vehicle-extras-groups {
    column-count: 2;
    column-gap: 20px;
}

@media screen and (max-width: 768px) {
    .vehicle-extras-groups {
        column-count: 1;
    }
 }

.vehicle-extras-group + .vehicle-extras-group {
    margin-top: 20px;
}

.vehicle-extras-groups + .vehicle-extra-text {
    margin-top: 20px;
}

.vehicle-extra-text {
    white-space: pre-line;
}

.vehicle-extra-text-content {
    white-space: pre-line;
    margin: 0;
}

.similar-vehicles {
  margin-top: 40px;
}

.vehicle-back-to-list-bottom {
  display: inline-block;
  margin-top: 40px;
}

.cta-close-gallery button:before {
  color: white;
}