/* Блок отзывов мастера — визуально как карусель MyReviews (без фильтров и сводки) */

.reviews__myreview .mr-widget {
  width: 100%;
  max-width: 1170px;
  margin: 0 auto;
}

.mr-widget__frame {
  background: #f3f4f8;
  border-radius: 16px;
  /* сверху как сбоку у viewport (20px) */
  padding: 20px 0 10px;
  box-sizing: border-box;
}

.mr-widget__viewport {
  position: relative;
  padding: 0 20px;
}

.mr-widget__slider {
  overflow: hidden;
}

.mr-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(28, 41, 71, 0.06);
  padding: 18px 18px 16px;
  min-height: 210px;
  height: 100%;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.mr-card__head {
  margin-bottom: 8px;
}

.mr-card__identity {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.mr-card__avatar-wrap {
  position: relative;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}

.mr-card__figure {
  margin: 0;
  width: 100%;
  height: 100%;
}

.mr-card__avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 20px;
  line-height: 1;
  color: #fff;
  text-transform: uppercase;
  user-select: none;
}

/* Градиенты аватаров как в виджете MyReviews (vertical, soft pastels) */
.mr-card__avatar--tone-1 { background: linear-gradient(rgb(251, 173, 125) 0%, rgb(247, 205, 102) 100%); }
.mr-card__avatar--tone-2 { background: linear-gradient(rgb(125, 211, 192) 0%, rgb(102, 196, 220) 100%); }
.mr-card__avatar--tone-3 { background: linear-gradient(rgb(248, 156, 168) 0%, rgb(244, 130, 145) 100%); }
.mr-card__avatar--tone-4 { background: linear-gradient(rgb(186, 170, 245) 0%, rgb(140, 150, 240) 100%); }
.mr-card__avatar--tone-5 { background: linear-gradient(rgb(253, 210, 120) 0%, rgb(245, 170, 70) 100%); }
.mr-card__avatar--tone-6 { background: linear-gradient(rgb(140, 220, 180) 0%, rgb(80, 190, 150) 100%); }
.mr-card__avatar--tone-7 { background: linear-gradient(rgb(240, 170, 210) 0%, rgb(220, 130, 230) 100%); }
.mr-card__avatar--tone-8 { background: linear-gradient(rgb(150, 200, 245) 0%, rgb(90, 170, 230) 100%); }

.mr-card__badge {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  background: #9aa0a6;
  overflow: hidden;
}

.mr-card__badge svg,
.mr-card__badge img {
  display: block;
  max-width: 100%;
  max-height: 100%;
}

.mr-card__badge-letter,
.mr-card__badge-ya {
  font-size: 9px;
  font-weight: 700;
  color: #fff;
  line-height: 1;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

.mr-card__badge-ya {
  font-size: 10px;
  font-weight: 800;
}

.mr-card__badge--yandex { background: #fc3f1d; }
.mr-card__badge--yandex-business { background: #1a1a1a; }
.mr-card__badge--google { background: #4285f4; }
.mr-card__badge--2gis { background: #22ac38; }
.mr-card__badge--flamp { background: #3d7eff; }
.mr-card__badge--avito { background: #00aaff; }
.mr-card__badge--yell { background: #e31e24; }
.mr-card__badge--zoon { background: #00a0e3; }
.mr-card__badge--other { background: #6b7280; }

.mr-card__meta {
  min-width: 0;
  padding-top: 2px;
}

.mr-card__name {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  color: #111;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mr-card__sub {
  margin-top: 3px;
  font-size: 13px;
  line-height: 1.3;
  color: #8b8fa3;
}

.mr-card__service-link {
  color: #8b8fa3;
}

.mr-card__platform-link {
  color: #4a55a2;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 500;
}

.mr-card__platform-link:hover {
  color: #343c7a;
}

.mr-card__platform-text {
  color: #8b8fa3;
}

.mr-card__rating {
  display: flex;
  gap: 0;
  margin: 8px 0 0;
}

.mr-card__star {
  display: inline-flex;
  color: #e5e7ef;
  line-height: 0;
}

.mr-card__star svg {
  display: block;
}

.mr-card__star.is-on {
  color: rgb(250, 200, 22);
}

.mr-card__body {
  flex: 1 1 auto;
  margin-top: 10px;
  min-height: 0;
}

.mr-card__text {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: #111;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
  overflow: hidden;
}

.mr-card.is-expanded {
  height: auto;
}

.mr-card.is-expanded .mr-card__body {
  flex: 0 1 auto;
  overflow: visible;
}

.mr-card.is-expanded .mr-card__text {
  display: block;
  -webkit-line-clamp: unset;
  overflow: visible;
}

/* Пока текст раскрыт — слайдер растёт по высоте; по бокам по-прежнему overflow:hidden */
.mr-widget.has-expanded .mr-widget__frame {
  overflow: hidden;
}

.mr-widget.has-expanded .mr-widget__slider,
.mr-widget.has-expanded .swiper-wrapper,
.mr-widget.has-expanded .swiper-slide {
  height: auto !important;
}

.mr-widget.has-expanded .mr-widget__slider {
  overflow: hidden;
}

.mr-card__read-more {
  display: inline-block;
  margin-top: 6px;
  padding: 0;
  border: 0;
  background: none;
  color: #4a55a2;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  cursor: pointer;
  font-family: inherit;
}

.mr-card__read-more:hover {
  color: #343c7a;
  text-decoration: underline;
}

.mr-card__read-more[hidden] {
  display: none !important;
}

.mr-widget__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 31px;
  height: 30px;
  border: none;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  padding: 0;
  line-height: 0;
  /* как в виджете MyReviews (.hZvWPT): fill #050C26 + opacity → серый вид */
  opacity: 0.09;
}

.mr-widget__nav:hover,
.mr-widget__nav:focus {
  outline: none;
  background: transparent;
}

.mr-widget__nav svg {
  display: block;
}

.mr-widget__nav--prev {
  left: 2px;
  transform: translateY(-50%) scaleX(-1);
}

.mr-widget__nav--next {
  right: 2px;
}

.mr-widget__nav.swiper-button-disabled {
  opacity: 0.09;
  cursor: default;
  pointer-events: none;
}

.mr-widget__footer {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 40px;
  margin-top: 10px;
  padding: 0 6px;
}

.mr-widget__pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0;
}

.mr-widget__pagination .swiper-pagination-bullet {
  width: 7px;
  height: 7px;
  margin: 0 4px !important;
  background: #cfd3de;
  opacity: 1;
}

.mr-widget__pagination .swiper-pagination-bullet-active {
  background: #6b7280;
}

.mr-widget__leave {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 16px;
  border-radius: 8px;
  background: #3b518d;
  color: #fff !important;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none !important;
  white-space: nowrap;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.mr-widget__leave:hover {
  background: #324574;
  color: #fff !important;
}

@media (max-width: 991px) {
  .mr-widget__frame {
    padding: 18px 0 8px;
  }

  .mr-widget__viewport {
    padding: 0 18px;
  }

  .mr-card {
    min-height: 200px;
    padding: 16px;
  }
}

@media (max-width: 767px) {
  .mr-widget__frame {
    border-radius: 12px;
    padding: 12px 0 8px;
  }

  .mr-widget__viewport {
    padding: 0 2px;
  }

  .mr-widget__nav {
    display: none;
  }

  .mr-card {
    min-height: 190px;
    padding: 14px;
  }

  .mr-card__name {
    font-size: 14px;
  }

  .mr-card__text {
    font-size: 13px;
    -webkit-line-clamp: 6;
  }

  .mr-card__avatar {
    font-size: 18px;
  }

  .mr-widget__footer {
    flex-direction: column;
    gap: 12px;
    min-height: 0;
    margin-top: 10px;
  }

  .mr-widget__leave {
    position: static;
    transform: none;
    width: 100%;
    height: 40px;
  }
}

/* --- Полный текст в боковой панели --- */
.mr-card__text.is-full {
  display: block;
  -webkit-line-clamp: unset;
  overflow: visible;
}

.mr-card--drawer {
  height: auto;
  min-height: 0;
  box-shadow: 0 1px 4px rgba(28, 41, 71, 0.08);
}

/* --- Плавающая кнопка справа (как виджет MyReviews) --- */
.mr-float {
  position: fixed;
  right: 20px;
  bottom: 24px;
  z-index: 40;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 10px 14px 10px 12px;
  border: none;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 4px 18px rgba(28, 41, 71, 0.18);
  cursor: pointer;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  text-align: left;
}

.mr-float__rating {
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  color: #111;
}

.mr-float__stars {
  display: inline-flex;
  gap: 1px;
  margin-top: 2px;
}

.mr-float__count {
  margin-top: 2px;
  font-size: 12px;
  line-height: 1.2;
  color: #6b7280;
}

.mr-float:hover {
  box-shadow: 0 6px 22px rgba(28, 41, 71, 0.22);
}

/* --- Боковая панель отзывов --- */
.mr-drawer {
  position: fixed;
  inset: 0;
  z-index: 120;
  pointer-events: none;
}

.mr-drawer.is-open {
  pointer-events: auto;
}

.mr-drawer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 24, 39, 0.35);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.mr-drawer.is-open .mr-drawer__backdrop {
  opacity: 1;
}

.mr-drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  width: min(420px, 100%);
  height: 100%;
  background: #f3f4f8;
  box-shadow: -8px 0 28px rgba(28, 41, 71, 0.18);
  transform: translateX(100%);
  transition: transform 0.28s ease;
}

.mr-drawer.is-open .mr-drawer__panel {
  transform: translateX(0);
}

.mr-drawer__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
  padding: 16px 16px 12px;
  background: #fff;
  border-bottom: 1px solid #e5e7ef;
}

.mr-drawer__score {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mr-drawer__score-num {
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
  color: #111;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

.mr-drawer__score-stars {
  display: inline-flex;
  gap: 1px;
}

.mr-drawer__subtitle {
  margin: 6px 0 0;
  font-size: 13px;
  color: #6b7280;
}

.mr-drawer__close {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border: none;
  border-radius: 50%;
  background: #f3f4f8 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14' fill='none'%3E%3Cpath d='M1 1l12 12M13 1L1 13' stroke='%23505050' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") center / 14px 14px no-repeat;
  cursor: pointer;
}

.mr-drawer__close:hover {
  background-color: #e8eaf0;
}

.mr-drawer__list {
  flex: 1 1 auto;
  overflow: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  -webkit-overflow-scrolling: touch;
}

.mr-drawer__footer {
  flex-shrink: 0;
  padding: 12px 16px 16px;
  background: #fff;
  border-top: 1px solid #e5e7ef;
}

.mr-drawer__leave {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  border-radius: 8px;
  background: #3b518d;
  color: #fff !important;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

.mr-drawer__leave:hover {
  background: #324574;
  color: #fff !important;
}

body.mr-drawer-open {
  overflow: hidden;
}

@media (max-width: 767px) {
  .mr-float {
    right: 12px;
    bottom: 18px;
    padding: 8px 12px;
  }

  .mr-float__rating {
    font-size: 18px;
  }

  .mr-drawer__panel {
    width: 100%;
  }
}
