/* Неймспейс — применится только в табе */
#reviews-content{
  --bg-overlay: rgba(0,0,0,.58);
  --panel: #151515;
  --panel-2: #1a1a1a;
  --text: #e9e9ea;
  --text-dim: #c1c1c3;
  --border: #2b2b2c;
  --star: #ffcc4d;
}

.write-review-btn {
    padding: 14px 24px 16px 24px;
    align-items: flex-start;
    width: 840px;
    border: none;
    border-radius: 12px;
    margin-right: 0px;
    cursor: pointer;
    transition: background-color 0.3s;
    font-size: 16px;
    font-weight: 600;
}

.checkbox-cont-rew {
    margin-top: 24px;
    margin-bottom: 24px;
    }

.section-title {
    color: rgb(255, 255, 255);
    font-size: 24px;
    font-weight: 700;
    line-height: 32px;
    text-transform: capitalize;
    margin-bottom: 20px;
}

/* 1. Глобальный сброс оставляем, он полезен для вёрстки */
#reviews-content .review-modal *,
#reviews-content .comments-container * {
    box-sizing: border-box;
    font-family: inherit;
}

/* 2. ОТМЕНЯЕМ сброс для проблемных элементов реакций */
#reviews-content .reaction-plus,
#reviews-content .reaction-icon,
#reviews-content .reaction-menu,
#reviews-content .reaction-gap {
    box-sizing: content-box; /* Возвращаем стандартную модель */
}


/* Модалка как на скрине */
#reviews-content .review-modal{position:fixed;inset:0;background:var(--bg-overlay);display:none;align-items:center;justify-content:center;z-index:1000}
#reviews-content .review-modal[aria-hidden="false"]{display:flex}

#reviews-content .review-dialog{
    width: min(720px, 92vw);
    min-height: 486px;
    max-height: max-content;
    background: var(--panel);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 40px 48px 48px 48px;
    color: var(--text);
    position: relative;
    box-sizing: border-box;
}

.reviewTextOn  {
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
}

.reviewTextOne {
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
}

#reviews-content #reviewModalTitle{
  margin:0 0 32px;
  text-align:center;
  font-size:28px;
  color:#fff;
}

#reviews-content .modal-close{
position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    cursor: pointer;
}

/* Формы */
#reviews-content .label{display:block;color:var(--text-dim);margin:6px 0}
#reviews-content .stars{display:flex;gap:12px;margin:6px 0 26px}
#reviews-content .star {
  /* Сбрасываем все стили кнопок по умолчанию */
  all: unset;
  cursor: pointer;
  line-height: 1; /* Предотвращает лишние отступы */
}
/* Стили для SVG-изображения внутри кнопки */
#reviews-content .star img {
  display: block;
  width: 24px;  /* Настройте размер по вашему дизайну */
  height: 24px;
  transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.review-actions a.edit-review {
    color: #fff; /* Белый цвет */
}

/* Эффект при наведении */
#reviews-content .star:hover img {
  transform: scale(1.15);
}
#reviews-content .star.active{color:var(--star)}
#reviews-content textarea{
    min-width: 100%;
    max-width: 100%;
    min-height: 104px;
    background: var(--panel-2);
    border: 2px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    padding: 14px 24px 16px 24px;
    resize: auto;
}
#reviews-content .checkbox label{display:flex;align-items:center;gap:10px;color:var(--text)}
#reviews-content .checkbox input[type="checkbox"]{accent-color:#8a6bff;width:20px;height:20px}

/* Кнопка Save — белая капсула */
#reviews-content .btn-primary{
  display:block;width:100%;
  background:#fff;
  color:rgba(18, 18, 18, 1);
  border:0;border-radius:12px;
  padding:14px 24px 16px 24px;font-weight:600;cursor:pointer;
  transition:filter .15s ease;
}
#reviews-content .btn-primary:hover{filter:brightness(.96)}

/* Список отзывов — минималистично */
/* --- СТИЛИ ДЛЯ ОТЗЫВОВ НА ОСНОВЕ КОММЕНТАРИЕВ --- */

/* --- СТИЛИ ДЛЯ ВЫВОДА ОТЗЫВОВ (ИСПРАВЛЕННЫЕ) --- */

/* Общий контейнер */
#reviews-content #commentsContainer {
    margin-bottom: 20px;
    font-family: "Inter", -apple-system, sans-serif; /* Устанавливаем единый шрифт */
}

/* Карточка отзыва */
.review-item {
    display: flex;
    align-items: flex-start;
    gap: 15px; /* Расстояние между аватаром и телом отзыва */
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
}
/* Убираем рамку у последнего отзыва */
.review-item:last-child {
    border-bottom: none;
}

/* Аватар */
.review-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

/* Тело отзыва */
.review-body {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    min-width: 0; /* Важно для flexbox, чтобы текст переносился */
}

/* Мета-информация */
.review-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap; /* Разрешаем перенос на мобильных */
    gap: 12px;
    margin-bottom: 10px;
}

/* Ник автора */
.review-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}

/* Пользовательский рейтинг */
.review-user-rating {
    font-size: 15px;
    color: var(--text-dim);
    border: 1px solid var(--border);
    padding: 2px 8px;
    border-radius: 8px;
}
.review-user-rating b {
    font-weight: 700;
    color: var(--text);
}

/* Дата */
.review-date {
    font-size: 14px;
    color: var(--text-dim);
}

/* Кнопки действий */
.review-actions {
    margin-left: auto; /* Прижимаем к правому краю */
    display: flex;
    gap: 15px;
    padding-left: 15px; /* Отступ от даты */
}
.review-actions a {
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: filter 0.2s;
}
.review-actions a.edit-review {
    color: #fff; /* Белая кнопка "Редактировать" */
}
.review-actions a.delete-review {
    color: #ff453a; /* Красная кнопка "Удалить" */
}
.review-actions a:hover {
    filter: brightness(0.8);
}

/* Текст отзыва */
.review-text {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-dim);
    white-space: pre-wrap; /* Сохраняет абзацы */
    overflow-wrap: break-word;
    max-width: 780px;
}

/* --- СТИЛИ ДЛЯ РЕАКЦИЙ В ОТЗЫВАХ --- */
/* Используем существующие стили для .comment-reactions, но повышаем z-index меню */

.review-spoiler {
    font-size: 15px;                 /* как у рейтинга */
    color: #ff6b6b;                  /* выделяющийся акцент текста */
    background: transparent;         /* без заливки, как у рейтинга */
    border: 1px solid #ff6b6b;
    padding: 2px 8px;                /* те же отступы */
    border-radius: 8px;              /* те же скругления */
    user-select: none;
    white-space: nowrap;
}

.reaction-plus {
    position: relative;
}

.review-reactions {
    display: flex;
    align-items: center;
    margin-top: 12px;
    margin-bottom: 12px;
    gap: 7px;
}

b, review-user-rating {
    display: contents !important;
}

.reaction-icon {
    display: flex;
    height: 8px;
    border-radius: 8px;
    background-color: #333;
    padding: 8px;
    cursor: pointer;
}

.vertical-separator {
    width: 1px;
    height: 24px;
    background-color: rgba(255, 255, 255, 0.2); /* Полупрозрачная белая черта */
    margin: 0px 5px 0px 0px; 
}

.reaction-menu {
    position: absolute;
    top: -122px;
    left: 0;
    background-color: #121212;
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
    width: 218px;
    border: 1px solid rgb(43 43 43);
    z-index: 1;
}

.reaction-gap {
    position: relative;
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    scrollbar-width: thin;
    scrollbar-color: grey #121212;
    overflow-x: hidden;
    overflow-y: auto;
    max-height: 90px;
}

.reaction-plus:hover .reaction-menu {
    display: block;
}

/* Список реакций */
.reaction-list {
    display: flex;
    flex-wrap: wrap;
    color: rgb(192, 192, 199);
    gap: 7px;
}

.reaction-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 2px 8px;
    border-radius: 30px;
    font-size: 16px;
    cursor: pointer;
}


/* Кнопки действия "Ответить" и "Пожаловаться" */
.comment-actions {
    display: flex;
    gap: 12px;
}

.reaction-emoji-select {
   cursor: pointer;
   width: 20px;
   height: 20px;
   object-fit: contain; 
   display: inline-block;
   vertical-align: middle;
}

.reaction-selected {
    background-color: #2f5d9e;
    color: #fff;
}

.rating-value {
    cursor: pointer;
}

.rating-tooltip {
    margin-top: 50px; 
    position: relative;
    background: rgb(41, 41, 41);
    border: 1px solid #2b2b2b;
    border-radius: 10px;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 6px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    z-index: 5;
    transition: opacity .2s ease, transform .2s ease;
}

.rating-tooltip.hidden {
    display: none;
}

/* стрелка сверху */
.rating-tooltip-arrow {
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 12px;
    height: 12px;
    background: rgb(41, 41, 41);
    border-top: 1px solid #2b2b2b;
    border-left: 1px solid #2b2b2b;
}

/* звёзды */
.rating-tooltip-stars {
    display: flex;
    gap: 6px;
}

.rating-tooltip .star {
    all: unset;
    cursor: pointer;
}

.rating-tooltip .star img {
    width: 20px;
    height: 20px;
    transition: transform 0.15s ease;
}

.rating-tooltip .star:hover img {
    transform: scale(1.15);
}
/* общий блок тултипа */
.rating-tooltip-fullstory {
    position: absolute;
    background: rgb(41, 41, 41);
    border: 1px solid #2b2b2b;
    border-radius: 10px;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
    z-index: 99;
    transform: translateX(-50%);
}

.rating-tooltip-fullstory.hidden {
    display: none;
}

/* стрелка снизу (указатель вверх) */
.rating-tooltip-arrow-fullstory {
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 12px;
    height: 12px;
    background: rgb(41, 41, 41);
    border-left: 1px solid #2b2b2b;
    border-bottom: 1px solid #2b2b2b;
}

/* звёзды */
.rating-tooltip-fullstory .rating-tooltip-stars {
    display: flex;
    gap: 6px;
}

.rating-tooltip-fullstory .star {
    all: unset;
    cursor: pointer;
}

.rating-tooltip-fullstory .star img {
    width: 22px;
    height: 22px;
    transition: transform 0.15s ease;
}

.rating-tooltip-fullstory .star:hover img {
    transform: scale(1.15);
}


.empty-no {
    width: 128px;
    height: 128px;
    margin: 10px 0;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    justify-content: center;
}

.empty-no-text {
    font-size: 20px;
    font-weight: 600;
    text-align: center;
    color: grey;
}

.empty {position: relative;align-items: center;padding: 16px 59px;text-align: -webkit-center;}

.empty-loader-text {padding-top: 16px;}