.mf-feedback {
  position: fixed;
  right: clamp(16px, 2.4vw, 38px);
  bottom: clamp(18px, 3vh, 34px);
  z-index: 180;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #121826;
}

.mf-feedback--console {
  bottom: clamp(224px, 24vh, 280px);
}

.mf-feedback[data-drag-position="custom"] {
  right: auto;
  bottom: auto;
}

.mf-feedback * {
  box-sizing: border-box;
}

.mf-feedback__toggle {
  min-width: 126px;
  height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(120, 139, 163, 0.28);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
  color: #283244;
  box-shadow: 0 18px 44px rgba(22, 33, 54, 0.14);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  touch-action: none;
  user-select: none;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
  backdrop-filter: blur(16px);
}

.mf-feedback[data-dragging="true"] .mf-feedback__toggle {
  cursor: grabbing;
}

.mf-feedback:not([data-dragging="true"]) .mf-feedback__toggle {
  cursor: grab;
}

.mf-feedback__toggle:hover {
  transform: translateY(-1px);
  border-color: rgba(30, 136, 229, 0.36);
  box-shadow: 0 20px 54px rgba(22, 33, 54, 0.18);
}

.mf-feedback__toggle:focus-visible,
.mf-feedback__close:focus-visible,
.mf-feedback__send:focus-visible,
.mf-feedback__field :is(input, textarea, select):focus-visible {
  outline: 3px solid rgba(42, 157, 232, 0.32);
  outline-offset: 2px;
}

.mf-feedback__icon {
  width: 16px;
  height: 14px;
  border: 1.7px solid #66809e;
  border-radius: 5px;
  position: relative;
  flex: 0 0 auto;
}

.mf-feedback__icon::after {
  content: "";
  position: absolute;
  left: 3px;
  bottom: -5px;
  width: 7px;
  height: 7px;
  border-left: 1.7px solid #66809e;
  border-bottom: 1.7px solid #66809e;
  background: inherit;
  transform: rotate(-25deg);
}

.mf-feedback__panel {
  position: absolute;
  right: 0;
  bottom: 54px;
  width: min(360px, calc(100vw - 32px));
  padding: 16px;
  border: 1px solid rgba(83, 112, 146, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 26px 70px rgba(18, 31, 51, 0.18);
  backdrop-filter: blur(18px);
}

.mf-feedback__panel[hidden] {
  display: none;
}

.mf-feedback__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.mf-feedback__title {
  font-size: 15px;
  line-height: 1.25;
  font-weight: 800;
  margin: 0 0 3px;
  color: #101827;
}

.mf-feedback__subtitle {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: #64748b;
}

.mf-feedback__close {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  background: #f2f6fb;
  color: #536477;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.mf-feedback__field {
  display: grid;
  gap: 6px;
  margin-bottom: 10px;
}

.mf-feedback__field label {
  font-size: 12px;
  line-height: 1.2;
  font-weight: 700;
  color: #42526a;
}

.mf-feedback__field input,
.mf-feedback__field textarea,
.mf-feedback__field select {
  width: 100%;
  border: 1px solid rgba(98, 121, 148, 0.22);
  border-radius: 9px;
  background: #fbfdff;
  color: #162033;
  font: inherit;
  font-size: 13px;
}

.mf-feedback__field input,
.mf-feedback__field select {
  height: 40px;
  padding: 0 11px;
}

.mf-feedback__field textarea {
  min-height: 104px;
  max-height: 220px;
  resize: vertical;
  padding: 10px 11px;
  line-height: 1.45;
}

.mf-feedback__honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.mf-feedback__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}

.mf-feedback__status {
  min-height: 18px;
  font-size: 12px;
  line-height: 1.35;
  color: #5f7188;
}

.mf-feedback__status[data-tone="error"] {
  color: #b42318;
}

.mf-feedback__status[data-tone="success"] {
  color: #087443;
}

.mf-feedback__send {
  min-width: 112px;
  height: 38px;
  border: 0;
  border-radius: 9px;
  background: #111827;
  color: white;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease;
}

.mf-feedback__send:hover {
  transform: translateY(-1px);
  background: #0b1220;
}

.mf-feedback__send:disabled {
  cursor: wait;
  opacity: 0.72;
  transform: none;
}

@media (max-width: 640px) {
  .mf-feedback {
    right: 10px;
    bottom: max(6px, env(safe-area-inset-bottom));
  }

  .mf-feedback--console {
    bottom: clamp(192px, 22vh, 232px);
  }

  .mf-feedback__toggle {
    width: 38px;
    min-width: 38px;
    height: 38px;
    padding: 0;
    gap: 0;
    font-size: 0;
  }

  .mf-feedback__panel {
    bottom: 46px;
  }
}
