/* UrbanStyle customisations. Keep vendor Aspro styles unmodified. */

/* Swiper stores banner images on the slide itself after the Aspro update. */
.main-slider__item {
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

/* Swiper's absolute rules override the markup's `static` class. Keep the
 * controls inside the flex navigation container: previous on the left,
 * next on the right. */
.main-slider ~ .navigation-container .slider-nav {
  position: static;
  margin: 0;
}

/* Keep the sprite's left/right direction; legacy banner styles rotate it. */
.main-slider ~ .navigation-container .slider-nav .svg {
  transform: none !important;
}

/* A logo-only manufacturer card must use the centre of its content area. */
.partner-detail__card {
  justify-content: center;
  padding: 10px;
}

.partner-detail__card-image {
  display: flex;
  justify-content: center;
  flex: 0 0 100%;
  width: 100%;
}

.partner-detail__image-wrapper {
  margin-right: 0;
  width: 100%;
}

.partner-detail__image {
  width: 100%;
  height: 150px;
}

.partner-detail__image-bg {
  background-size: contain;
}

.partner-epilog .ordered-block__title {
  display: none;
}

/* The search control is a button, while other toolbar items are links. */
@media (max-width: 991px) {
  .bottom-icons-panel__content-link--search {
    display: flex !important;
    padding: 0 3px 2px !important;
  }
}

/* The production mobile banner uses pagination dots, not navigation arrows. */
@media (max-width: 767px) {
  .main-slider ~ .navigation-container .navigation {
    display: none !important;
  }

  .main-slider ~ .navigation-container .swiper-pagination {
    display: block !important;
    bottom: 12px;
    left: 0;
    width: 100%;
  }

  .main-slider ~ .navigation-container .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    margin: 0 4px;
    background: rgba(255, 255, 255, 0.85);
    opacity: 1;
  }

  .main-slider ~ .navigation-container .swiper-pagination-bullet::before {
    display: none;
  }

  .main-slider ~ .navigation-container .swiper-pagination-bullet-active {
    background: var(--theme-base-color);
  }
}

/* Production banner fills the viewport below the header. */
@media (min-width: 768px) {
  .main-slider ~ .navigation-container .navigation-wrapper {
    margin-bottom: 32px;
  }

  .main-slider ~ .navigation-container .navigation {
    right: 32px;
  }

  .main-slider ~ .navigation-container .swiper-pagination {
    bottom: 18px;
  }
}

/* Legacy and current Aspro video CSS are loaded together. Normalise the
 * current play control to one 100px round button. */
.company-item__picture .video-block__play {
  top: auto !important;
  right: auto !important;
  bottom: calc(50% + var(--size) / 2) !important;
  left: calc(50% - var(--size) / 2) !important;
  width: var(--size) !important;
  height: var(--size) !important;
  pointer-events: none;
}

.company-item__picture .video-block__play::before {
  top: 50% !important;
  left: 50% !important;
  width: var(--size) !important;
  height: var(--size) !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: var(--theme-base-color) !important;
  transform: translate(-50%, -50%) !important;
}

.company-item__picture .video-block__play::after {
  top: 50% !important;
  left: 50% !important;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  border: 14px solid transparent !important;
  border-left: 25px solid #fff !important;
  border-radius: 0 !important;
  background: transparent !important;
  transform: translate(-30%, -50%) !important;
  z-index: 3;
}
