/* /assets/css/pages/reviews.css */


/* Важное: не ставим overflow hidden/auto на layout, иначе body-скролл ломается */
.reviews-layout {
  flex: 1;
  display: flex;
  align-items: stretch;
  gap: 0;

  /* ключ: разрешаем детям shrink, чтобы работал overflow у центра */
  min-height: 0;
}
.reviews-list{
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.reviews-list__state {
  padding: 24px 16px;
  text-align: center;
  color: #666;
  font-size: 14px;
}

.reviews-list__state--error {
  color: #c62828;
}

.reviews-list__retry {
  display: inline-block;
  margin-top: 10px;
  padding: 6px 14px;
  border: 1px solid #c62828;
  border-radius: 6px;
  background: #fff;
  color: #c62828;
  cursor: pointer;
  font-size: 13px;
}

.reviews-stream.is-refreshing {
  opacity: 0.72;
  pointer-events: none;
}
/* Центральный список: скроллится сам, если не помещается */
.reviews-stream {
  flex: 1 1 auto;
  min-width: 0;

  /* ключ */
  min-height: 0;
  max-height: 100vh;
  overflow-y: auto;

  padding: 40px;
}

/* карточка 730x167, как в макете */
.review-card {
  height: 167px;
  max-height: 200px;
  border: 1px solid #d0d0d0;
  background: #ffffff;
  padding: 14px 16px;
  cursor: pointer;
  overflow: hidden;
  transition: opacity 0.18s ease;
}

.reviews-stream.has-selection .review-card:not(.is-selected) {
  opacity: 0.5;
}

.review-card__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.review-card__order {
  font-size: 18px;
  font-weight: 500;
  color: #333333;
}

.review-card__rating {
  font-weight: 500;
  font-size: 18px;
  color: #333333;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  white-space: nowrap;
}

.review-card__star {
  font-size: 18px;
  transform: translateY(-1px);
}

.review-card__who {
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
}

.review-card__labels,
.review-card__names {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.review-card__label {
  font-size: 18px;
  color: #999999;
}

.review-card__names {
  text-align: right;
}

.review-card__name {
  font-size: 18px;
  color: #333333;
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 420px;
  font-weight: 500;
}

.review-card__text {
  font-size: 18px;
  color: #333333;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* правая панель 376px, background #333, padding 40 */
.reviews-side {
  width: 376px;
  flex: 0 0 376px;
  background: #333333;
  color: #ffffff;
  overflow: auto;
  position: sticky;
  top: 0;
  align-self: flex-start;
  height: 100%;
  padding: 25px 24px;
}

.reviews-side__empty {
  width: 100%;
  height: 100%;
}

.reviews-side__wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
}

.reviews-side__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.reviews-side__label, .reviews-side__rowLeft {
  font-size: 14px;
  color: #FFFFFF;
  opacity: 0.5;
}

.reviews-side__rowRight {
  font-size: 14px;
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
}

.reviews-side__divider {
  height: 1px;
  background: #FFFFFF99;
  margin: 6px 0;
}
.reviews-side__row--order div{
  font-size: 20px;
  font-weight: 600;
  color: #FFFFFF;
  opacity: 1;
}
.reviews-side__field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}


.reviews-side__input {
  width: 100%;
  height: 40px;
  padding: 8.5px 10px;
  border: 1px solid #656565;
  background: transparent;
  color: #ffffff;
  font-size: 18px;
  line-height: 1;
}

.reviews-side__grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* переключатели */
.reviews-side__toggles {
  margin-top: auto;
  display: flex;
  flex-direction: column;
}/* разделитель между переключателями */
.reviews-side__toggles > .reviews-switch + .reviews-switch {
  border-top: 0.5px solid #FFFFFF99;
  margin-top: 10px;     /* по желанию */
  padding-top: 10px;    /* по желанию */
}


.reviews-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  user-select: none;
}

.reviews-switch__label {
  font-size: 18px;
  color: #ffffff;
  line-height: 1.2;
}

.reviews-switch__control {
  position: relative;
  width: 44px;
  height: 24px;
  flex: 0 0 44px;
}

.reviews-switch__input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
/* трек */
.reviews-switch__ui::before{
  content: "";
  position: absolute;
  left: 8px;
  top: 5px;
  width: 24px;
  height: 10px;
  border-radius: 16px;
  background: #999999;
  transition: background-color 260ms cubic-bezier(.2,.8,.2,1);
}

/* кружок */
.reviews-switch__ui::after{
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.16);
  transition: transform 260ms cubic-bezier(.2,.8,.2,1), box-shadow 260ms cubic-bezier(.2,.8,.2,1);
}

.reviews-switch__input:checked + .reviews-switch__ui::before{
  background: #E25507; /* без градиента */
}

.reviews-switch__input:checked + .reviews-switch__ui::after{
  transform: translateX(24px);
}
/* анимация нажатия */
.reviews-switch__input:active + .reviews-switch__ui::after{
  transform: translateX(0) scale(0.90);
  box-shadow: 0 1px 4px rgba(0,0,0,0.18);
}
.reviews-switch__input:checked:active + .reviews-switch__ui::after{
  transform: translateX(24px) scale(0.90);
  box-shadow: 0 1px 4px rgba(0,0,0,0.18);
}
/* кликабельное имя в боковой панели (button) */
button.reviews-side__input.is-link {
  text-decoration: underline;
  cursor: pointer;
  appearance: none;
  font: inherit;
  text-align: left;
}
