/* Peek Rating — vanilla port of reactbits.dev/micro/peek-rating
   Scoped to the review form only. Colours follow the store palette. */
.prod-rating .peek-rating {
  --pr-size: 28px;
  --pr-gap: 6px;
  --pr-room: 22px;
  --pr-active: #f5b400;
  --pr-idle: #cccccc;
  --pr-tip: #27272a;
  --pr-tip-text: #f5f5f5;
  --pr-rise: 320ms;
  --pr-ease: cubic-bezier(0.23, 1, 0.32, 1);
  position: relative;
  display: inline-flex;
  vertical-align: middle;
  font-size: 14px;
  line-height: 1;
  color: var(--pr-idle);
}

.prod-rating .peek-rating__row {
  position: relative;
  display: inline-flex;
  align-items: flex-end;
  margin: 0;
  padding-top: var(--pr-room);
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}

.prod-rating .peek-rating__star {
  display: grid;
  place-items: center;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  width: calc(var(--pr-size) + var(--pr-gap));
  height: calc(var(--pr-size) + 8px);
  font: inherit;
  color: inherit;
  cursor: pointer;
  outline: none;
  touch-action: manipulation;
}

.prod-rating .peek-rating__star:focus-visible {
  border-radius: 6px;
  outline: 2px solid rgba(245, 180, 0, 0.75);
  outline-offset: 2px;
}

@media (pointer: coarse) {
  .prod-rating .peek-rating__star {
    min-width: 44px;
    min-height: 44px;
  }
}

.prod-rating .peek-rating__lift {
  display: block;
  transform-origin: bottom center;
  transition: transform var(--pr-rise) var(--pr-ease);
  will-change: transform;
}

.prod-rating .peek-rating__glyph {
  display: block;
  width: var(--pr-size);
  height: var(--pr-size);
  color: var(--pr-idle);
  transition: color 160ms ease;
}

.prod-rating .peek-rating__glyph[data-lit="true"] {
  color: var(--pr-active);
}

.prod-rating .peek-rating__glyph svg {
  display: block;
  width: 100%;
  height: 100%;
}

.prod-rating .peek-rating__tip {
  position: absolute;
  left: 0;
  top: 0;
  display: inline-flex;
  align-items: center;
  height: calc(var(--pr-size) * 0.6);
  padding: 0 calc(var(--pr-size) * 0.3);
  border-radius: 999px;
  background: var(--pr-tip);
  color: var(--pr-tip-text);
  font-size: calc(var(--pr-size) * 0.38);
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.01em;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
  transition: transform var(--pr-rise) var(--pr-ease), opacity 180ms ease;
}

.prod-rating .peek-rating__tip[data-show="true"] {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .prod-rating .peek-rating__lift {
    transition: none;
  }
  .prod-rating .peek-rating__tip {
    transition: opacity 180ms ease;
  }
}

/* Review list stars — same amber as the rating widget above the list. */
html body .main-content #content:has(.well.otz) #review .rating .fa-star,
html body .main-content #content:has(.well.otz) #review .rating .fa-star-o {
  color: #f5b400 !important;
}

/* Product page: review list stars use the same amber as the form. */
html body .main-content #content .review-list .rating .fa-star,
html body .main-content #content .review-list .rating .fa-star-o {
  color: #f5b400 !important;
}

/* iOS zoom fix: inputs must be >= 16px on mobile, otherwise Safari zooms the page on focus. */
@media (max-width: 767px) {
  html body .main-content #content .form-review .form-control,
  html body .main-content #content .form-review input[type="text"],
  html body .main-content #content .form-review input[type="email"],
  html body .main-content #content .form-review textarea,
  html body .main-content #content .form-review select,
  html body .main-content #content #post-review-box input,
  html body .main-content #content #post-review-box textarea,
  html body .main-content #content #answers-box input,
  html body .main-content #content #answers-box textarea {
    font-size: 16px !important;
    line-height: 1.4 !important;
  }
}

/* Banner on the reviews page: full width, whole image, no crop. */
.ua-otz-banner { margin: 0 auto 22px; max-width: 1100px; }
.ua-otz-banner img { display: block; width: 100%; height: auto; border-radius: 20px; box-shadow: 0 14px 34px rgba(32, 40, 50, 0.14); }
@media (max-width: 1199px) {
  .ua-otz-banner { max-width: none; }
}
@media (max-width: 767px) {
  .ua-otz-banner { margin: 0 0 14px; }
  .ua-otz-banner img { border-radius: 14px; }
}

/* Mobile: the card title is vertically centred in .well (top:50%), so with the
   review form opened it lands on top of the fields. Keep it centred while the
   form is collapsed and pin it to the card top once the form is opened. */
@media (max-width: 767px) {
  html body .main-content #content .well.well-sm.otz::before {
    top: 17px;
    transform: none;
  }
  html body .main-content #content .well.well-sm.otz:has(#post-review-box[style*="none"])::before {
    top: 50%;
    transform: translateY(-50%);
  }
  html body .main-content #content .well.well-sm.otz:has(#post-review-box:not([style*="none"])) #post-review-box {
    margin-top: 34px;
  }
}


/* ==== Rating badges (Google 5.0 / Prom 4.9) ==== */
.myr-google-mini,
  .myr-google-mini * { box-sizing: border-box; }

  .myr-google-mini {
    width: 100%;
    max-width: 332px;
    margin: 12px 0;
    font-family: inherit;
  }

  .myr-google-mini__link {
    display: flex;
    align-items: center;
    gap: 13px;
    min-height: 90px;
    padding: 12px 14px;
    color: #222b38 !important;
    background: #fff;
    border: 1px solid #e4e7ed;
    border-radius: 14px;
    box-shadow: 0 3px 14px rgba(16, 24, 40, .06);
    text-decoration: none !important;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
  }

  .myr-google-mini__link:hover,
  .myr-google-mini__link:focus-visible {
    border-color: #d8b15a;
    box-shadow: 0 6px 20px rgba(16, 24, 40, .11);
    transform: translateY(-1px);
    text-decoration: none !important;
  }

  .myr-google-mini__link:focus-visible {
    outline: 2px solid #a77715;
    outline-offset: 2px;
  }

  .myr-google-mini__emblem {
    width: 45px;
    height: 45px;
    flex: 0 0 45px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 11px;
    color: #4285f4;
    background: #f4f7fd;
    font-size: 30px;
    font-weight: 800;
    line-height: 1;
  }

  /* Лёгкая многоцветная буква G без внешних картинок и шрифтов. */
  @supports (-webkit-background-clip: text) {
    .myr-google-mini__emblem-letter {
      background: conic-gradient(from -44deg, #4285f4 0 27%, #34a853 27% 45%, #fbbc05 45% 60%, #ea4335 60% 74%, #4285f4 74% 100%);
      -webkit-background-clip: text;
      background-clip: text;
      -webkit-text-fill-color: transparent;
    }
  }

  .myr-google-mini__body { min-width: 0; flex: 1; }
  .myr-google-mini__top { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }

  .myr-google-mini__number {
    color: #19202c;
    font-size: 28px;
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -.8px;
    white-space: nowrap;
  }

  .myr-google-mini__number small {
    color: #7d8592;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0;
  }

  .myr-google-mini__stars {
    color: #e8ad29;
    font-size: 16px;
    letter-spacing: 1px;
    white-space: nowrap;
  }

  .myr-google-mini__caption {
    display: block;
    margin-top: 3px;
    color: #6b7280;
    font-size: 11px;
    line-height: 1.25;
  }

  .myr-google-mini__cta {
    display: block;
    margin-top: 5px;
    color: #3c4655;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.25;
  }

  .myr-google-mini__cta strong { font-weight: 750; }
  .myr-google-mini__arrow { margin-left: 2px; }

  @media (max-width: 370px) {
    .myr-google-mini__link { padding: 10px 11px; gap: 10px; }
    .myr-google-mini__stars { font-size: 14px; }
  }

  @media (prefers-reduced-motion: reduce) {
    .myr-google-mini__link { transition: none; }
  }

.myr-prom-mini,
  .myr-prom-mini * { box-sizing: border-box; }

  .myr-prom-mini {
    width: 100%;
    max-width: 332px;
    margin: 12px 0;
    font-family: inherit;
  }

  .myr-prom-mini__link {
    display: flex;
    align-items: center;
    gap: 13px;
    min-height: 90px;
    padding: 12px 14px;
    color: #222b38 !important;
    background: #fff;
    border: 1px solid #e4e7ed;
    border-radius: 14px;
    box-shadow: 0 3px 14px rgba(16, 24, 40, .06);
    text-decoration: none !important;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
  }

  .myr-prom-mini__link:hover,
  .myr-prom-mini__link:focus-visible {
    border-color: #d8b15a;
    box-shadow: 0 6px 20px rgba(16, 24, 40, .11);
    transform: translateY(-1px);
    text-decoration: none !important;
  }

  .myr-prom-mini__link:focus-visible { outline: 2px solid #a77715; outline-offset: 2px; }

  .myr-prom-mini__emblem {
    width: 45px;
    height: 45px;
    flex: 0 0 45px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 11px;
    color: #b58216;
    background: linear-gradient(145deg, #fff7df, #fff0c8);
    font-size: 26px;
    line-height: 1;
  }

  .myr-prom-mini__body { min-width: 0; flex: 1; }
  .myr-prom-mini__top { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }

  .myr-prom-mini__number {
    color: #19202c;
    font-size: 28px;
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -.8px;
    white-space: nowrap;
  }

  .myr-prom-mini__number small {
    color: #7d8592;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0;
  }

  .myr-prom-mini__stars {
    color: #e8ad29;
    font-size: 16px;
    letter-spacing: 1px;
    white-space: nowrap;
  }

  .myr-prom-mini__caption {
    display: block;
    margin-top: 3px;
    color: #6b7280;
    font-size: 11px;
    line-height: 1.25;
  }

  .myr-prom-mini__cta {
    display: block;
    margin-top: 5px;
    color: #3c4655;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.25;
  }

  .myr-prom-mini__cta strong { font-weight: 750; }
  .myr-prom-mini__cta .myr-prom-mini__arrow { margin-left: 2px; }
  @media (max-width: 370px) {
    .myr-prom-mini__link { padding: 10px 11px; gap: 10px; }
    .myr-prom-mini__stars { font-size: 14px; }
  }
  @media (prefers-reduced-motion: reduce) {
    .myr-prom-mini__link { transition: none; }
  }

/* Overlay badges on the reviews banner */
.ua-otz-banner { position: relative; }
.ua-otz-banner__badges {
  position: absolute;
  right: 18px;
  bottom: 16px;
  display: flex;
  gap: 10px;
  align-items: flex-end;
  z-index: 2;
  max-width: calc(100% - 36px);
}
.ua-otz-banner__badge .myr-google-mini,
.ua-otz-banner__badge .myr-prom-mini { margin: 0; max-width: none; width: 290px; }
.ua-otz-banner__badge .myr-google-mini__link,
.ua-otz-banner__badge .myr-prom-mini__link {
  min-height: 78px;
  padding: 10px 12px;
  gap: 10px;
  border-radius: 12px;
  box-shadow: 0 8px 22px rgba(10, 16, 28, 0.28);
}
.ua-otz-banner__badge .myr-google-mini__number,
.ua-otz-banner__badge .myr-prom-mini__number { font-size: 24px; }
.ua-otz-banner__badge .myr-google-mini__emblem,
.ua-otz-banner__badge .myr-prom-mini__emblem {
  width: 38px; height: 38px; flex: 0 0 38px; font-size: 24px; border-radius: 10px;
}
.ua-otz-banner__badge .myr-google-mini__caption,
.ua-otz-banner__badge .myr-prom-mini__caption { font-size: 10.5px; }
.ua-otz-banner__badge .myr-google-mini__cta,
.ua-otz-banner__badge .myr-prom-mini__cta { font-size: 11px; white-space: nowrap; }

@media (max-width: 1199px) {
  .ua-otz-banner__badge .myr-google-mini,
  .ua-otz-banner__badge .myr-prom-mini { width: 246px; }
  .ua-otz-banner__badge .myr-google-mini__link,
  .ua-otz-banner__badge .myr-prom-mini__link { min-height: 72px; padding: 9px 10px; }
  .ua-otz-banner__badge .myr-google-mini__number,
  .ua-otz-banner__badge .myr-prom-mini__number { font-size: 21px; }
  .ua-otz-banner__badge .myr-google-mini__cta,
  .ua-otz-banner__badge .myr-prom-mini__cta { font-size: 9.6px; }
}

@media (max-width: 767px) {
  .ua-otz-banner__badges {
    position: static;
    max-width: none;
    margin-top: 10px;
    gap: 8px;
    flex-direction: column;
    align-items: stretch;
  }
  .ua-otz-banner__badge { width: 100%; }
  .ua-otz-banner__badge .myr-google-mini,
  .ua-otz-banner__badge .myr-prom-mini { width: 100%; }
  .ua-otz-banner__badge .myr-google-mini__link,
  .ua-otz-banner__badge .myr-prom-mini__link { min-height: 66px; box-shadow: 0 4px 14px rgba(16,24,40,.10); }
}
