footer .rada-metrika-trigger {
  margin: 0;
  padding: .28em .64em;
  background: #101b36;
  color: #ffd3ef;
  border: 1px solid #ff6bbb;
  border-radius: 8px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 0 11px #f340a260;
}

footer:not(.rb-home-footer) > .rada-metrika-trigger { margin-left: auto; }

body > footer.rb-home-footer:has(> button.rada-metrika-trigger) {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) !important;
  align-items: center !important;
}
body > footer.rb-home-footer > .rb-footer-brand {
  grid-area: 1 / 1;
  justify-self: start;
}
body > footer.rb-home-footer > .rb-footer-request {
  grid-area: 1 / 2;
  justify-self: center;
}
body > footer.rb-home-footer > .rada-metrika-trigger {
  grid-area: 1 / 3;
  justify-self: end;
}
@media (max-width: 950px) {
  body > footer.rb-home-footer:has(> button.rada-metrika-trigger) {
    grid-template-columns: 1fr auto !important;
  }
  body > footer.rb-home-footer > .rb-footer-request {
    grid-area: 2 / 1 / 3 / -1;
    max-width: 100%;
    width: auto;
  }
  body > footer.rb-home-footer > .rada-metrika-trigger { grid-area: 1 / 2; }
}

.rada-metrika {
  box-sizing: border-box;
  position: fixed;
  inset: auto auto max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  margin: 0;
  width: min(calc(100vw - 24px), max(300px, 33.33vw));
  min-height: min(33.33dvh, 250px);
  max-height: calc(100dvh - 24px);
  overflow: auto;
  padding: 16px;
  border: 1px solid #42d9ff;
  border-radius: 14px;
  background: linear-gradient(145deg,#091b35,#220e32);
  box-shadow: 0 0 18px #168cff88, 0 0 24px #ff3d9160;
  color: #eef7ff;
  font: 14px/1.35 Arial, sans-serif;
}
.rada-metrika::backdrop { background: #02081945; }
.rada-metrika h2 { margin: 0 36px 12px 0; color: #f1f6ff; font-size: 18px; }
.rada-metrika p { margin: 8px 0; color: inherit; }
.rada-metrika a { color: #8be8ff; text-decoration: underline; }
dialog.rada-metrika > button.rada-metrika-close {
  position: absolute;
  inset: 8px 8px auto auto;
  margin: 0;
  padding: 0;
  display: grid;
  place-items: center;
  background: #251536;
  border: 1px solid #ff87cd;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  width: 30px;
  height: 30px;
  font: 22px/1 Arial, sans-serif;
}
.rada-metrika-trigger:focus-visible,.rada-metrika-close:focus-visible {
  outline: 2px solid #8be8ff;
  outline-offset: 2px;
}
.rada-metrika-chart { display: flex; gap: 5px; padding: 0; margin: 12px 0; list-style: none; }
.rada-metrika-chart li { flex: 1; min-width: 0; display: grid; justify-items: center; gap: 3px; font-size: 11px; }
.rada-metrika-bar { display: flex; align-items: end; height: 62px; width: 100%; }
.rada-metrika-bar i { width: 100%; min-height: 2px; border-radius: 4px 4px 0 0; background: linear-gradient(#48dfff,#794bff,#ff479f); }
.rada-metrika [hidden] { display: none; }
