/* ============================================================
   Solpower — блок отзывов (эталонная вёрстка)
   Чистый HTML/CSS. Все классы с префиксом sp-rv- — это намеренно,
   чтобы не пересекаться со стилями старого шаблона Joomla 2.5.
   НЕ переименовывайте классы при интеграции — на них завязан CSS.
   ============================================================ */

.sp-rv,
.sp-rv * {
  box-sizing: border-box;
}

.sp-rv {
  /* единственная точка, где задаётся фон секции отзывов */
  background: #F7F6F4;
  font-family: "Nunito", "Helvetica Neue", Arial, sans-serif;
  color: #1F1F22;
  padding: 40px;
  /* блок встроен в карточку товара — ширину ограничивает контейнер шаблона.
     max-width страхует на широких лейаутах. */
}

.sp-rv__inner {
  max-width: 720px;
  margin: 0 auto;
}

/* ----- Заголовок ----- */
.sp-rv__head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 0 0 18px;
}
.sp-rv__title {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
}
.sp-rv__count {
  font-size: 15px;
  font-weight: 500;
  color: #9A9A96;
}

/* ----- Сводка / средняя оценка ----- */
.sp-rv__summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 40px;
  background: #FFFFFF;
  border-radius: 18px;
  box-shadow: 0 1px 2px rgba(20, 18, 14, .04), 0 8px 28px rgba(20, 18, 14, .05);
  padding: 30px;
  margin: 0 0 26px;
}
.sp-rv__score {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  min-width: 130px;
}
.sp-rv__avg {
  font-size: 56px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
}
.sp-rv__count2 {
  font-size: 13px;
  font-weight: 500;
  color: #9A9A96;
}

.sp-rv__dist {
  flex: 1;
  min-width: 230px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.sp-rv__bar {
  display: flex;
  align-items: center;
  gap: 10px;
}
.sp-rv__bar-label {
  display: flex;
  align-items: center;
  gap: 2px;
  width: 30px;
  font-size: 13px;
  font-weight: 600;
  color: #71716F;
}
.sp-rv__track {
  flex: 1;
  height: 8px;
  background: #EFEDE9;
  border-radius: 99px;
  overflow: hidden;
}
.sp-rv__fill {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #FFB23E, #F26B1F);
}
.sp-rv__bar-num {
  width: 22px;
  text-align: right;
  font-size: 13px;
  color: #9A9A96;
  font-variant-numeric: tabular-nums;
}

/* ----- Звёзды ----- */
.sp-rv__stars {
  letter-spacing: 2px;
  line-height: 1;
  color: #DCDAD6;            /* пустые */
}
.sp-rv__stars i {
  font-style: normal;
  color: #FF9F1C;            /* заполненные */
}
.sp-rv__stars--lg { font-size: 20px; }
.sp-rv__stars--sm { font-size: 15px; }

/* ----- Список отзывов ----- */
.sp-rv__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.sp-rv__item {
  background: #FFFFFF;
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(20, 18, 14, .04);
  padding: 24px;
  transition: box-shadow .18s ease;
}
.sp-rv__item:hover {
  box-shadow: 0 4px 22px rgba(20, 18, 14, .08);
}
.sp-rv__item-head {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.sp-rv__avatar {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12);
}
.sp-rv__meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.sp-rv__author {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.sp-rv__date {
  font-size: 13px;
  color: #A3A39E;
}
.sp-rv__item-rating {
  margin-left: auto;
  padding-left: 8px;
}
.sp-rv__text {
  margin: 14px 0 0;
  font-size: 15px;
  line-height: 1.62;
  color: #3D3D40;
  white-space: pre-line;
  text-wrap: pretty;
}
.sp-rv__item-foot {
  margin-top: 14px;
  display: flex;
  justify-content: flex-end;
}
.sp-rv__quote {
  border: 0;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: #9A9A96;
  padding: 6px 10px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color .15s ease, background .15s ease;
}
.sp-rv__quote:hover {
  color: #F26B1F;
  background: #FBF1EA;
}
.sp-rv__quote span { font-size: 15px; line-height: 1; }

/* ----- Форма ----- */
.sp-rv__form {
  background: #FFFFFF;
  border-radius: 18px;
  box-shadow: 0 1px 2px rgba(20, 18, 14, .04), 0 8px 28px rgba(20, 18, 14, .05);
  padding: 32px;
  margin-top: 30px;
}
.sp-rv__form-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 4px;
}
.sp-rv__form-sub {
  margin: 0 0 22px;
  font-size: 14px;
  color: #9A9A96;
}
.sp-rv__field { margin-bottom: 16px; }
.sp-rv__label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #71716F;
  margin-bottom: 8px;
}
.sp-rv__input,
.sp-rv__textarea {
  width: 100%;
  padding: 13px 15px;
  border: 1.5px solid #E7E4DF;
  border-radius: 11px;
  font-family: inherit;
  font-size: 15px;
  color: #1F1F22;
  background: #FCFBF9;
  outline: none;
  transition: border-color .15s ease, background .15s ease;
}
.sp-rv__textarea {
  min-height: 130px;
  line-height: 1.55;
  resize: vertical;
}
.sp-rv__input:focus,
.sp-rv__textarea:focus {
  border-color: #F26B1F;
  background: #FFFFFF;
}

/* выбор оценки в форме */
.sp-rv__rate {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}
.sp-rv__rate-stars {
  display: flex;
  gap: 4px;
  font-size: 30px;
  line-height: 1;
  color: #DCDAD6;
  cursor: pointer;
}
.sp-rv__rate-stars span { transition: transform .12s ease; }
.sp-rv__rate-stars span:hover { transform: scale(1.15); }
.sp-rv__rate-hint { font-size: 13px; color: #A3A39E; }

/* капча */
.sp-rv__captcha-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}
.sp-rv__captcha-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}
.sp-rv__captcha-img {
  width: 132px;
  height: 50px;
  border-radius: 11px;
  border: 1.5px solid #E7E4DF;
  /* реальная картинка капчи приходит из компонента Joomla;
     этот фон — лишь placeholder в эталоне */
  background: repeating-linear-gradient(45deg, #F4F2EE, #F4F2EE 6px, #EEEBE5 6px, #EEEBE5 12px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Courier New", monospace;
  font-size: 22px;
  font-weight: 700;
  font-style: italic;
  letter-spacing: 3px;
  color: #6B6B66;
  transform: skewX(-6deg);
  user-select: none;
}
.sp-rv__captcha-refresh {
  border: 0;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: #9A9A96;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.sp-rv__captcha-refresh:hover { color: #F26B1F; }
.sp-rv__captcha-input {
  flex: 1;
  min-width: 150px;
  height: 50px;
  padding: 0 15px;
  border: 1.5px solid #E7E4DF;
  border-radius: 11px;
  font-family: inherit;
  font-size: 15px;
  color: #1F1F22;
  background: #FCFBF9;
  outline: none;
  transition: border-color .15s ease, background .15s ease;
}
.sp-rv__captcha-input:focus { border-color: #F26B1F; background: #FFFFFF; }

/* кнопка отправки */
.sp-rv__submit {
  margin-top: 24px;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  padding: 14px 28px;
  border-radius: 12px;
  background: linear-gradient(180deg, #F8852E, #F26B1F);
  box-shadow: 0 4px 14px rgba(242, 107, 31, .32);
  transition: transform .12s ease, box-shadow .15s ease;
}
.sp-rv__submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(242, 107, 31, .42);
}
.sp-rv__submit:active { transform: translateY(0); }

/* ============================================================
   Адаптив. Блок и так тянется через flex-wrap, но на узких
   экранах подчищаем отступы и размеры шрифта.
   ============================================================ */
@media (max-width: 560px) {
  .sp-rv { padding: 18px; }
  .sp-rv__title { font-size: 24px; }
  .sp-rv__summary { padding: 20px; gap: 22px; justify-content: center; }
  .sp-rv__item { padding: 18px; }
  .sp-rv__form { padding: 22px; }
  .sp-rv__form-title { font-size: 19px; }
  .sp-rv__avg { font-size: 48px; }
}

/* ============================================================
   Solpower site-integration overrides (NOT in the standalone
   reference). The live template applies a global heading font
   (PT Sans Narrow) to <h2>/<h3>, and Bootstrap styles
   input[type=text] (border 1px #ccc, radius 4px, 14px) — both
   outrank the reference's class rules. Re-assert the mockup
   values with enough specificity / a font !important.
   ============================================================ */

/* Headings must use Nunito like the rest of the block */
.sp-rv .sp-rv__title,
.sp-rv .sp-rv__form-title {
  font-family: "Nunito", "Helvetica Neue", Arial, sans-serif !important;
}

/* Name / captcha text inputs — Bootstrap overrides .sp-rv__input, so re-assert
   the reference field styling with higher specificity. */
.sp-rv .sp-rv__input,
.sp-rv .sp-rv__captcha-input {
  height: auto;
  padding: 13px 15px;
  border: 1.5px solid #E7E4DF;
  border-radius: 11px;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.3;
  color: #1F1F22;
  background: #FCFBF9;
  box-shadow: none;
}
.sp-rv .sp-rv__captcha-input { height: 50px; padding: 0 15px; }
.sp-rv .sp-rv__input:focus,
.sp-rv .sp-rv__textarea:focus,
.sp-rv .sp-rv__captcha-input:focus {
  border-color: #F26B1F;
  background: #FFFFFF;
  outline: none;
  box-shadow: none;   /* kill Bootstrap's blue focus glow — orange border only */
}

/* ============================================================
   Reviews pagination — site-styled pills (bottom only).
   Overrides JComments' default grey squares (tpl/default/style.css).
   ============================================================ */
body #jc #nav-bottom {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 30px 0 2px;
  padding: 0;
}
body #jc #nav-bottom span.page,
body #jc #nav-bottom span.hoverpage,
body #jc #nav-bottom span.activepage {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 13px;
  box-sizing: border-box;
  border-radius: 12px;
  border: 1.5px solid #E6E8EC;
  background: #fff;
  color: #5A6270;
  font-family: 'Nunito', -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-weight: 800;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  transition: color .15s ease, background .15s ease, border-color .15s ease, box-shadow .15s ease;
  -webkit-user-select: none;
  user-select: none;
}
body #jc #nav-bottom span.page:hover,
body #jc #nav-bottom span.hoverpage {
  border-color: #F8A85A;
  color: #F47A20;
  background: #FFF6EE;
}
body #jc #nav-bottom span.activepage {
  background: linear-gradient(135deg, #F9952F, #F47A20);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 7px 16px rgba(244,122,32,.32);
  cursor: default;
}
body #jc #nav-bottom span.activepage b { font-weight: 800; color: #fff; }

/* ============================================================
   Review FORM design — global (#jc) copy of the product-page rules that lived
   under .productdetails-view in sp-product.css, so article pages (FAQ, etc.)
   render the same panel / inputs / amber star picker / orange button.
   #jc (the JComments wrapper, on every page with reviews) out-specifies the
   article-page Bootstrap form CSS. Literal colours — the --spp-* vars are
   scoped to .productdetails-view and not available elsewhere.
   ============================================================ */
#jc .sp-rv__panel{ background:#F8F9FB; border:1px solid #EEF0F3; border-radius:20px; padding:clamp(18px,4vw,28px); margin-top:28px; }
#jc .sp-rv__form{ background:transparent; border:0; box-shadow:none; padding:0; margin:0; }
#jc .sp-rv__form-title{ font-family:'Nunito',-apple-system,'Segoe UI',Roboto,sans-serif; font-size:22px; font-weight:800; color:#2A2F3A; margin:0 0 6px; }
#jc .sp-rv__form-sub{ font-family:'Nunito',-apple-system,'Segoe UI',Roboto,sans-serif; font-size:14.5px; font-weight:500; color:#98A0AD; margin:0 0 20px; }
#jc .sp-rv__row{ display:grid; grid-template-columns:1fr 1fr; gap:16px; }
#jc .sp-rv__label{ font-family:'Nunito',-apple-system,'Segoe UI',Roboto,sans-serif; font-size:14px; font-weight:800; color:#2A2F3A; margin-bottom:8px; }
#jc .sp-rv__input,
#jc .sp-rv__textarea,
#jc .sp-rv__captcha-input{ border:1.5px solid #E4E7EC; border-radius:13px; padding:14px 16px; background:#fff; box-shadow:none;
  font-family:'Nunito',-apple-system,'Segoe UI',Roboto,sans-serif; font-size:15px; font-weight:500; color:#2A2F3A; }
#jc .sp-rv__textarea{ min-height:130px; line-height:1.55; resize:vertical; }
#jc .sp-rv__input:focus,
#jc .sp-rv__textarea:focus,
#jc .sp-rv__captcha-input:focus{ border-color:#F57C20; background:#fff; box-shadow:none; outline:none; }
#jc .sp-rv__submit{ background:#F57C20; background-image:none; border:0; color:#fff; border-radius:14px;
  box-shadow:0 8px 20px rgba(245,124,32,.3); padding:15px 30px; font-family:'Nunito',-apple-system,'Segoe UI',Roboto,sans-serif;
  font-size:16px; font-weight:800; margin-top:18px; cursor:pointer; }
#jc .sp-rv__submit:hover{ filter:brightness(.94); transform:none; box-shadow:0 8px 20px rgba(245,124,32,.3); }
/* star picker "Ваша оценка" */
#jc .sp-rv__rate{ display:flex; align-items:center; gap:12px; margin-bottom:20px; }
#jc .sp-rv__rate-label{ font-family:'Nunito',-apple-system,'Segoe UI',Roboto,sans-serif; font-weight:800; font-size:15px; color:#5A6270; }
#jc .sp-rv__rate-stars{ display:flex; gap:4px; font-size:26px; line-height:1; cursor:pointer; color:#DCE0E6; }
#jc .sp-rv__rate-stars span{ color:#DCE0E6; transition:color .12s ease, transform .12s ease; }
#jc .sp-rv__rate-stars span.is-on{ color:#F5A623; }
#jc .sp-rv__rate-stars span:hover{ transform:scale(1.12); }
/* per-review stars */
#jc .sp-rv__stars i{ color:#DCE0E6; }
#jc .sp-rv__stars i.is-on{ color:#F5A623; }
@media (max-width:560px){ #jc .sp-rv__row{ grid-template-columns:1fr; } }
