/* Official Maps iframe chrome. Site CSS cannot style cards inside the iframe.
   Theme reset `* { max-width: 100% }` must not shrink the 760×800 widget. */

.reviews--yandex .reviews__layout {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 20px;
  width: 100%;
}

.reviews--yandex .reviews__yandex {
  width: 100%;
  max-width: 760px;
  height: calc(800px * var(--reviews-scale, 1));
  margin: 0 auto;
  overflow: hidden;
  position: relative;
}

.reviews--yandex .reviews__yandex iframe {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: 760px;
  height: 800px;
  max-width: none;
  max-height: none;
  border: 1px solid #e6e6e6;
  border-radius: 8px;
  box-sizing: border-box;
  background: #fff;
  appearance: auto;
  transform-origin: top left;
  transform: scale(var(--reviews-scale, 1));
}

.reviews--yandex .reviews__aside {
  display: block;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  box-sizing: border-box;
  padding: 24px 20px 28px 36px;
  background: var(--reviews-accent, #5024ff);
  color: #fff;
  clip-path: polygon(16px 0, 100% 0, 100% 100%, 0 100%);
}

.reviews--yandex .reviews__aside-score {
  margin: 0;
  color: #fff;
  font-family: Unbounded, sans-serif;
  font-size: 36px;
  font-weight: 700;
  line-height: 1;
}

.reviews--yandex .reviews__aside-meta {
  margin: 8px 0 0;
  color: #fff;
  font-family: Roboto, sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.3;
}

.reviews--yandex .reviews__aside-text {
  margin: 16px 0 0;
  max-width: 52ch;
  color: #fff;
  font-family: Roboto, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.45;
}

.reviews--yandex .reviews__aside-text p {
  margin: 0;
  color: #fff;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}

.reviews--yandex .reviews__aside-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 18px;
  min-height: 48px;
  max-width: 100%;
  padding: 12px 20px;
  background: #fff;
  color: color-mix(in srgb, var(--reviews-accent, #5024ff) 78%, #000);
  font-family: Unbounded, sans-serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  white-space: normal;
}

@media (prefers-reduced-motion: no-preference) {
  .reviews--yandex .reviews__aside-btn {
    transition: background 0.3s, color 0.3s;
  }
}

.reviews--yandex .reviews__aside-btn:hover {
  background: color-mix(in srgb, #fff 88%, var(--reviews-accent, #5024ff));
  color: color-mix(in srgb, var(--reviews-accent, #5024ff) 78%, #000);
}

@media (max-width: 767px) {
  .reviews.reviews--yandex > .container {
    width: 100% !important;
    max-width: none !important;
    padding-left: calc(16px + env(safe-area-inset-left, 0px));
    padding-right: calc(16px + env(safe-area-inset-right, 0px));
    box-sizing: border-box;
  }
}

@media (min-width: 768px) {
  .reviews--yandex .reviews__layout {
    gap: 24px;
  }

  .reviews--yandex .reviews__aside {
    padding: 32px 36px 36px 52px;
    clip-path: polygon(36px 0, 100% 0, 100% 100%, 0 100%);
  }

  .reviews--yandex .reviews__aside-score {
    font-size: 48px;
  }

  .reviews--yandex .reviews__aside-meta {
    margin-top: 10px;
    font-size: 16px;
  }

  .reviews--yandex .reviews__aside-text {
    margin-top: 24px;
    font-size: 18px;
  }

  .reviews--yandex .reviews__aside-btn {
    margin-top: 24px;
    padding: 12px 22px;
  }
}

/* Long course titles (baza) overflow the 697px flex min-height; the buy button sits on the frame. */
@media only screen and (max-width: 767px) {
  .course.xs-show > .container {
    min-height: 0 !important;
    height: auto !important;
    display: block;
  }

  .course.xs-show .course__content {
    height: auto !important;
  }
}

@media (min-width: 1200px) {
  .reviews--yandex .reviews__layout {
    flex-direction: row;
    align-items: stretch;
    gap: 30px;
  }

  .reviews--yandex .reviews__yandex {
    flex: 0 0 760px;
    width: 760px;
    max-width: 760px;
    height: 800px;
    margin: 0;
  }

  .reviews--yandex .reviews__yandex iframe {
    transform: none;
  }

  .reviews--yandex .reviews__aside {
    flex: 1 1 0;
    min-width: 0;
    max-width: none;
    margin: 0;
    padding: 30px 36px 30px 48px;
    clip-path: polygon(28px 0, 100% 0, 100% 100%, 0 100%);
  }

  .reviews--yandex .reviews__aside-score {
    font-size: 60px;
  }

  .reviews--yandex .reviews__aside-meta {
    font-size: 18px;
  }

  .reviews--yandex .reviews__aside-text {
    margin-top: 36px;
  }

  .reviews--yandex .reviews__aside-btn {
    margin-top: 28px;
  }
}
