.feedback-widget {
  position: fixed;
  top: calc(50% + 126px);
  right: 23px;
  bottom: auto;
  z-index: 60;
  display: grid;
  gap: 4px;
  justify-items: end;
  width: 214px;
  pointer-events: none;
  transition:
    top 280ms ease,
    right 280ms ease,
    bottom 280ms ease,
    transform 320ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 240ms ease;
}

.feedback-widget.is-hidden-on-feedback {
  opacity: 0;
  pointer-events: none;
  transform: translateX(18px) scale(0.86);
}

.feedback-widget.feedback-widget--bottom-docked {
  top: auto;
  right: var(--back-to-top-offset-x, calc(18px + env(safe-area-inset-right, 0px)));
  bottom: calc(
    var(--back-to-top-offset-y, calc(18px + env(safe-area-inset-bottom, 0px)))
    + var(--feedback-widget-bottom-extra, 0px)
  );
}

.feedback-widget__action {
  position: relative;
  display: grid;
  justify-items: end;
  width: 214px;
  height: 46px;
  pointer-events: auto;
}

.feedback-widget__toggle,
.feedback-widget__store-link,
.feedback-widget__option {
  font: inherit;
}

.feedback-widget__toggle,
.feedback-widget__store-link {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  overflow: hidden;
  width: 42px;
  min-width: 42px;
  height: 42px;
  padding: 0;
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  pointer-events: auto;
  background: #1267d8;
  border: 1px solid rgba(18, 103, 216, 0.7);
  border-radius: 999px;
  box-shadow:
    0 14px 30px rgba(18, 103, 216, 0.32),
    0 0 0 4px rgba(96, 165, 250, 0.12);
  transition:
    width 360ms cubic-bezier(0.22, 1, 0.36, 1),
    padding 260ms ease,
    gap 260ms ease,
    background-color 220ms ease,
    box-shadow 260ms ease,
    transform 220ms ease;
}

.feedback-widget__action:hover .feedback-widget__toggle,
.feedback-widget__action:hover .feedback-widget__store-link,
.feedback-widget__toggle:hover,
.feedback-widget__toggle:focus-visible,
.feedback-widget__store-link:hover,
.feedback-widget__store-link:focus-visible,
.feedback-widget.is-open .feedback-widget__toggle {
  gap: 9px;
  width: 214px;
  padding-inline: 13px 17px;
  background: #0f5fc9;
  box-shadow:
    0 18px 42px rgba(18, 103, 216, 0.42),
    0 0 0 8px rgba(96, 165, 250, 0.18);
  transform: translateY(-1px);
  animation: feedback-toggle-pulse 1200ms ease-in-out infinite;
}

.feedback-widget__toggle-icon,
.feedback-widget__option-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
}

.feedback-widget__toggle-icon {
  width: 28px;
  height: 28px;
}

.feedback-widget__browser-icon {
  width: 28px;
  height: 28px;
}

.feedback-widget__toggle-text {
  display: inline-block;
  max-width: 0;
  overflow: hidden;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(6px);
  transition:
    max-width 380ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 200ms ease,
    transform 260ms ease;
}

.feedback-widget__action:hover .feedback-widget__toggle-text,
.feedback-widget__toggle:hover .feedback-widget__toggle-text,
.feedback-widget__toggle:focus-visible .feedback-widget__toggle-text,
.feedback-widget__store-link:hover .feedback-widget__toggle-text,
.feedback-widget__store-link:focus-visible .feedback-widget__toggle-text,
.feedback-widget.is-open .feedback-widget__toggle .feedback-widget__toggle-text {
  max-width: 162px;
  opacity: 1;
  transform: translateX(0);
}

.feedback-widget__toggle-icon svg,
.feedback-widget__option-icon svg,
.feedback-widget__toggle-icon img,
.feedback-widget__option-icon img {
  width: 100%;
  height: 100%;
}

.feedback-widget__toggle-icon svg,
.feedback-widget__option-icon svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feedback-widget__toggle-icon img,
.feedback-widget__option-icon img {
  display: block;
  object-fit: contain;
}

.feedback-widget__store-link[data-install-browser="yandex"] .feedback-widget__browser-icon img {
  width: 23px;
  height: 23px;
}

.feedback-widget__menu {
  position: absolute;
  z-index: 3;
  top: 0;
  right: calc(100% + 10px);
  bottom: auto;
  display: grid;
  gap: 8px;
  width: 254px;
  padding: 8px;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(191, 219, 254, 0.74);
  border-radius: 18px;
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.14);
  opacity: 0;
  transform: translateX(8px) scale(0.98);
  transform-origin: right top;
  transition:
    opacity 180ms ease,
    transform 220ms ease;
  backdrop-filter: blur(16px);
}

.feedback-widget.is-open .feedback-widget__menu {
  pointer-events: auto;
  opacity: 1;
  transform: translateX(0) scale(1);
}

@keyframes feedback-toggle-pulse {
  0%,
  100% {
    box-shadow:
      0 18px 42px rgba(18, 103, 216, 0.42),
      0 0 0 8px rgba(96, 165, 250, 0.18);
  }

  50% {
    box-shadow:
      0 20px 46px rgba(18, 103, 216, 0.48),
      0 0 0 11px rgba(96, 165, 250, 0.1);
  }
}

.feedback-widget__option {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
  min-height: 52px;
  padding: 9px 10px;
  color: #172033;
  text-align: left;
  cursor: pointer;
  background: rgba(248, 251, 255, 0.82);
  border: 1px solid rgba(226, 232, 240, 0.82);
  border-radius: 13px;
  transition:
    background-color 220ms ease,
    border-color 220ms ease,
    color 180ms ease;
}

.feedback-widget__option:hover,
.feedback-widget__option:focus-visible {
  background: rgba(239, 246, 255, 0.96);
  border-color: rgba(147, 197, 253, 0.76);
  outline: none;
}

.feedback-widget__option-icon {
  width: 34px;
  height: 34px;
  color: var(--primary);
  background: rgba(219, 234, 254, 0.72);
  border-radius: 11px;
}

.feedback-widget__option[data-feedback-option="issue"] .feedback-widget__option-icon {
  color: #dc2626;
  background: rgba(254, 226, 226, 0.92);
  box-shadow:
    0 0 0 4px rgba(248, 113, 113, 0.12),
    0 10px 22px rgba(220, 38, 38, 0.16);
}

.feedback-widget__option[data-feedback-option="idea"] .feedback-widget__option-icon {
  color: #8a5a00;
  background: rgba(255, 248, 209, 0.86);
  box-shadow:
    0 0 0 4px rgba(255, 236, 153, 0.28),
    0 10px 22px rgba(217, 119, 6, 0.22);
}

.feedback-widget__option-icon svg {
  width: 22px;
  height: 22px;
}

.feedback-widget__option strong {
  display: block;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.2;
}

.feedback-inline-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  width: min(1080px, 100%);
  margin: 0 auto;
}

.feedback-inline-action {
  width: min(310px, 100%);
  min-height: 64px;
  padding: 12px;
}

[data-theme="dark"] .feedback-widget__toggle,
[data-theme="dark"] .feedback-widget__store-link {
  background: #1a73e8;
  border-color: rgba(96, 165, 250, 0.5);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .feedback-widget__action:hover .feedback-widget__toggle,
[data-theme="dark"] .feedback-widget__toggle:hover,
[data-theme="dark"] .feedback-widget__toggle:focus-visible,
[data-theme="dark"] .feedback-widget__store-link:hover,
[data-theme="dark"] .feedback-widget__store-link:focus-visible,
[data-theme="dark"] .feedback-widget.is-open .feedback-widget__toggle {
  background: #2a83f4;
  box-shadow:
    0 18px 42px rgba(30, 120, 255, 0.34),
    0 0 0 8px rgba(96, 165, 250, 0.16);
}

[data-theme="dark"] .feedback-widget__menu {
  background: rgba(13, 20, 32, 0.9);
  border-color: rgba(96, 165, 250, 0.24);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.34);
}

[data-theme="dark"] .feedback-widget__option {
  color: #eef4ff;
  background: rgba(15, 23, 42, 0.72);
  border-color: rgba(148, 163, 184, 0.22);
}

[data-theme="dark"] .feedback-widget__option:hover,
[data-theme="dark"] .feedback-widget__option:focus-visible {
  background: rgba(30, 64, 120, 0.42);
  border-color: rgba(96, 165, 250, 0.34);
}

[data-theme="dark"] .feedback-widget__option-icon {
  color: #8ec5ff;
  background: rgba(30, 64, 120, 0.42);
}

[data-theme="dark"] .feedback-widget__option[data-feedback-option="issue"] .feedback-widget__option-icon {
  color: #ff8a8a;
  background: rgba(127, 29, 29, 0.42);
  box-shadow:
    0 0 0 4px rgba(248, 113, 113, 0.14),
    0 12px 24px rgba(220, 38, 38, 0.22);
}

[data-theme="dark"] .feedback-widget__option[data-feedback-option="idea"] .feedback-widget__option-icon {
  color: #7c4a00;
  background: rgba(255, 248, 209, 0.88);
  box-shadow:
    0 0 0 4px rgba(255, 236, 153, 0.24),
    0 12px 24px rgba(245, 158, 11, 0.2);
}

@media (max-width: 1120px) {
  .feedback-widget {
    top: calc(50% + 92px);
    right: 20px;
  }

  .feedback-widget__menu {
    width: min(254px, calc(100vw - 84px));
  }
}

@media (max-width: 760px) {
  .feedback-widget {
    top: auto;
    right: calc(16px + env(safe-area-inset-right, 0px));
    bottom: calc(16px + env(safe-area-inset-bottom, 0px) + var(--feedback-widget-bottom-extra, 0px));
  }

  .feedback-widget__menu {
    top: auto;
    right: 0;
    bottom: calc(100% + 10px);
    width: min(254px, calc(100vw - 32px));
    transform: translateY(8px) scale(0.98);
    transform-origin: right bottom;
  }
}
