.mdreviews-carousel {
  --mdr-bg: #fff;
  --mdr-border-color: #e5e5e5;
  --mdr-shadow: 0 2px 12px rgba(0, 0, 0, .05);
  --mdr-star-filled: #f5a623;
  --mdr-star-empty: #d8d8d8;
  --mdr-quote: #e5e5e5;
  --mdr-text: #222;
  --mdr-muted: #c9c9c9;
  --mdr-radius: 0px;
  --mdr-padding: 24px;

  position: relative;
  padding: 24px 0;
  color: var(--mdr-text);
}

.mdreviews-carousel__title {
  text-align: center;
  margin-bottom: 24px;
}

.mdreviews-carousel .swiper {
  padding: 8px 4px 32px;
  overflow: hidden;
}

.mdreviews-card {
  background: var(--mdr-bg);
  border: 1px solid var(--mdr-border-color);
  border-radius: var(--mdr-radius);
  box-shadow: var(--mdr-shadow);
  padding: var(--mdr-padding);
  display: flex;
  flex-direction: column;
  height: auto;
  box-sizing: border-box;
}

.mdreviews-card__top {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 4px 12px;
  align-items: start;
  margin-bottom: 16px;
}

.mdreviews-card__date {
  grid-column: 1;
  grid-row: 1;
  font-size: 12px;
  text-transform: uppercase;
  color: var(--mdr-muted);
  letter-spacing: .04em;
}

.mdreviews-card__name {
  grid-column: 1;
  grid-row: 2;
  font-size: 18px;
  font-weight: 400;
  margin: 0;
  line-height: 1.2;
  color: #c92466;
}

.mdreviews-card__stars {
  grid-column: 2;
  grid-row: 1 / span 2;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.mdreviews-star {
  font-size: 16px;
  line-height: 1;
}

.mdreviews-star--filled { color: var(--mdr-star-filled, #f5a623); }
.mdreviews-star--empty  { color: var(--mdr-star-empty, #d8d8d8); }

.mdreviews-card__body {
  position: relative;
  padding-top: 12px;
}

.mdreviews-card__quote {
  color: var(--mdr-quote);
  margin-bottom: 8px;
  display: block;
}

.mdreviews-card__short {
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 16px;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mdreviews-card__more {
  align-self: flex-start;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
  background: transparent;
  border: 1px solid currentColor;
  padding: 8px 16px;
  border-radius: var(--mdr-radius);
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}

.mdreviews-card__more:hover,
.mdreviews-card__more:focus-visible {
  background: var(--mdr-text);
  color: #fff;
}

.mdreviews-carousel .swiper-button-prev,
.mdreviews-carousel .swiper-button-next {
  color: var(--mdr-text);
}

.mdreviews-carousel .swiper-pagination-bullet-active {
  background: var(--mdr-text);
}

/* Modal */
/* Пока открыта модалка (и в момент её закрытия) плавная прокрутка темы
   html { scroll-behavior: smooth } должна быть выключена: иначе возврат на
   сохранённую позицию проигрывается анимацией и страница «прыгает» вверх,
   а потом плавно едет назад к блоку отзывов. Класс вешает/снимает скрипт. */
html.mdreviews-noscroll,
html.mdreviews-noscroll body {
  scroll-behavior: auto !important;
}

/* Модалка полного отзыва добавляется скриптом в конец <body>, то есть ВНЕ
   .mdreviews-carousel. Из-за этого CSS-переменные, объявленные на карусели,
   до модалки не доходили: «залитые» звёзды получали не жёлтый цвет, а
   унаследованный серый цвет текста. Дублируем палитру на самой модалке. */
.mdreviews-modal {
  --mdr-bg: #fff;
  --mdr-radius: 0px;
  --mdr-text: #222;
  --mdr-muted: #c9c9c9;
  --mdr-star-filled: #f5a623;
  --mdr-star-empty: #d8d8d8;

  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.mdreviews-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .5);
}

.mdreviews-modal__dialog {
  position: relative;
  background: var(--mdr-bg, #fff);
  border-radius: var(--mdr-radius, 6px);
  max-width: 600px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 32px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, .25);
}

/* The close button. The theme styles every <button>: 7px 15px padding and a
   red background on hover (theme.css `button:hover`), which turned the "×"
   into an off-centre red box. Everything the theme touches is pinned here,
   and the cross is drawn with two bars instead of a "×" glyph, whose position
   inside the box depends on the font. */
.mdreviews-modal .mdreviews-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  min-width: 0;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
  font-size: 0;
  line-height: 0;
  cursor: pointer;
  color: var(--mdr-muted, #888);
  transform: none;
  transition: background-color .15s ease, color .15s ease;
}

.mdreviews-modal .mdreviews-modal__close::before,
.mdreviews-modal .mdreviews-modal__close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 2px;
  margin: -1px 0 0 -8px;
  border-radius: 1px;
  background: currentColor;
}

.mdreviews-modal .mdreviews-modal__close::before { transform: rotate(45deg); }
.mdreviews-modal .mdreviews-modal__close::after { transform: rotate(-45deg); }

.mdreviews-modal .mdreviews-modal__close:hover {
  background: #f1f1f1;
  color: var(--mdr-text, #222);
  transform: none;
  scale: 1;
}

/* The button is focused when the modal opens; that must not look like hover. */
.mdreviews-modal .mdreviews-modal__close:focus {
  background: transparent;
  outline: 0;
}

.mdreviews-modal .mdreviews-modal__close:focus:hover {
  background: #f1f1f1;
}

.mdreviews-modal .mdreviews-modal__close:focus-visible {
  outline: 2px solid #b41f5b;
  outline-offset: 2px;
}

.mdreviews-modal__date {
  font-size: 12px;
  text-transform: uppercase;
  color: var(--mdr-muted, #888);
  letter-spacing: .04em;
}

.mdreviews-modal__name {
  font-size: 22px;
  font-weight: 600;
  margin: 8px 0 12px;
}

.mdreviews-modal__stars {
  margin-bottom: 20px;
}

.mdreviews-modal__body {
  font-size: 15px;
  line-height: 1.6;
}

@media (max-width: 600px) {
  .mdreviews-card { padding: 16px; }
  .mdreviews-modal__dialog { padding: 20px; }
}
