html.mxp-feedback-ui-active,
body.mxp-feedback-ui-active {
  overflow: hidden !important;
  overscroll-behavior: contain;
}

body.mxp-feedback-ui-active {
  touch-action: none;
}

.mxp-feedback-button {
  position: fixed;
  z-index: 2147483000;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  padding: 11px 16px;
  border: 0;
  border-radius: 999px;
  background: #0f766e;
  color: #fff;
  font: 600 14px/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  box-shadow: 0 10px 28px rgba(15, 118, 110, .28), 0 2px 6px rgba(0, 0, 0, .18);
  cursor: pointer;
}

.mxp-feedback-button:hover,
.mxp-feedback-button:focus {
  background: #0d9488;
  outline: 3px solid rgba(13, 148, 136, .28);
  outline-offset: 2px;
}

.mxp-feedback-button:disabled {
  cursor: wait;
  opacity: .75;
}

.mxp-feedback-bottom-right {
  right: calc(20px + env(safe-area-inset-right, 0px));
}

.mxp-feedback-bottom-left {
  left: calc(20px + env(safe-area-inset-left, 0px));
}

.mxp-feedback-surface-admin {
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  min-width: 44px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, .18);
  background: #1d2327;
  color: #f0f0f1;
  font-size: 12px;
  line-height: 1.15;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .18);
  opacity: .54;
  transition: opacity .16s ease, transform .16s ease, background-color .16s ease;
}

.mxp-feedback-surface-admin.mxp-feedback-bottom-right {
  right: calc(8px + env(safe-area-inset-right, 0px));
}

.mxp-feedback-surface-admin.mxp-feedback-bottom-left {
  left: calc(168px + env(safe-area-inset-left, 0px));
}

.folded .mxp-feedback-surface-admin.mxp-feedback-bottom-left {
  left: calc(48px + env(safe-area-inset-left, 0px));
}

.mxp-feedback-surface-admin.mxp-feedback-mode-subtle-tab {
  border-radius: 999px;
}

.mxp-feedback-surface-admin:hover,
.mxp-feedback-surface-admin:focus {
  background: #2271b1;
  opacity: 1;
  transform: translateY(-1px);
}

.mxp-feedback-surface-admin:disabled {
  opacity: .7;
}

.mxp-feedback-status {
  position: fixed;
  z-index: 2147483646;
  left: 50%;
  top: 24px;
  transform: translateX(-50%);
  max-width: min(92vw, 460px);
  padding: 12px 16px;
  border-radius: 12px;
  background: #111827;
  color: #fff;
  font: 500 14px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  box-shadow: 0 14px 40px rgba(0, 0, 0, .25);
}

.mxp-feedback-recording-control {
  position: fixed;
  z-index: 2147483647;
  right: calc(20px + env(safe-area-inset-right, 0px));
  top: calc(20px + env(safe-area-inset-top, 0px));
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(92vw, 420px);
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(17, 24, 39, .94);
  color: #fff;
  font: 700 14px/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  box-shadow: 0 14px 40px rgba(0, 0, 0, .28);
}

.mxp-feedback-recording-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 0 0 rgba(239, 68, 68, .8);
  animation: mxp-feedback-recording-pulse 1.2s infinite;
}

.mxp-feedback-recording-text {
  white-space: nowrap;
}

.mxp-feedback-recording-time {
  min-width: 38px;
  font-variant-numeric: tabular-nums;
}

.mxp-feedback-recording-control button {
  min-height: 32px;
  padding: 6px 10px;
  border: 0;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font: inherit;
  cursor: pointer;
}

.mxp-feedback-recording-control button:hover,
.mxp-feedback-recording-control button:focus {
  background: #b91c1c;
  outline: 3px solid rgba(248, 113, 113, .35);
}

.mxp-feedback-recording-control button:disabled {
  cursor: wait;
  opacity: .78;
}

@keyframes mxp-feedback-recording-pulse {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, .8); }
  70% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.mxp-feedback-modal {
  position: fixed;
  z-index: 2147483647;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(17, 24, 39, .72);
  box-sizing: border-box;
  overflow: auto;
  overscroll-behavior: contain;
}

.mxp-feedback-dialog {
  position: relative;
  width: min(720px, 100%);
  max-height: min(92vh, 840px);
  overflow: auto;
  box-sizing: border-box;
  border-radius: 18px;
  background: #fff;
  color: #111827;
  padding: 24px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .32);
  font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.mxp-feedback-modal,
.mxp-feedback-modal *,
.mxp-feedback-modal *::before,
.mxp-feedback-modal *::after {
  box-sizing: border-box;
}

.mxp-feedback-modal {
  font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #111827;
}

.mxp-feedback-dialog h2::before,
.mxp-feedback-dialog h2::after {
  content: none !important;
}

.mxp-feedback-dialog button,
.mxp-feedback-dialog input,
.mxp-feedback-dialog textarea,
.mxp-feedback-dialog select,
.mxp-feedback-recording-control button {
  appearance: none;
  -webkit-appearance: none;
  margin: 0;
  box-shadow: none;
  opacity: 1;
  transform: none;
  text-transform: none;
  text-decoration: none;
  letter-spacing: normal;
  text-shadow: none;
}

.mxp-feedback-dialog h2 {
  margin: 0 40px 8px 0;
  font-size: 22px;
  line-height: 1.25;
  color: #111827;
}

.mxp-feedback-help {
  margin: 0 0 16px;
  color: #4b5563;
}

.mxp-feedback-close {
  position: absolute;
  right: 14px;
  top: 12px;
  width: 34px;
  height: 34px;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 50%;
  background: #f3f4f6 !important;
  color: #111827 !important;
  font: 700 24px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  cursor: pointer;
}

.mxp-feedback-preview {
  display: block;
  max-width: 100%;
  max-height: 42vh;
  object-fit: contain;
  margin: 0 0 16px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #f9fafb;
}

.mxp-feedback-label {
  display: block;
  margin: 0 0 6px;
  font-weight: 700;
}

.mxp-feedback-label span {
  color: #dc2626;
  font-weight: 600;
}

.mxp-feedback-message {
  display: block;
  width: 100%;
  box-sizing: border-box;
  min-height: 116px;
  padding: 12px !important;
  border: 1px solid #d1d5db !important;
  border-radius: 12px;
  background: #fff !important;
  color: #111827 !important;
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  resize: vertical;
}

.mxp-feedback-message:focus {
  border-color: #0d9488;
  outline: 3px solid rgba(13, 148, 136, .18);
}

.mxp-feedback-alert {
  margin: 14px 0 0;
  padding: 10px 12px;
  border: 1px solid #fecaca;
  border-radius: 10px;
  background: #fef2f2;
  color: #991b1b;
}

.mxp-feedback-success {
  margin: 12px 0 0;
  padding: 12px;
  border-radius: 10px;
  background: #ecfdf5;
  color: #065f46;
}

.mxp-feedback-success code,
.mxp-feedback-alert code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.mxp-feedback-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.mxp-feedback-primary,
.mxp-feedback-secondary {
  min-height: 40px;
  padding: 9px 14px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
}

.mxp-feedback-mode-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.mxp-feedback-mode-card {
  min-height: 116px;
  padding: 16px !important;
  border: 1px solid #d1d5db !important;
  border-radius: 14px;
  background: #f8fafc !important;
  color: #111827 !important;
  font: inherit !important;
  text-align: left;
  cursor: pointer;
}

.mxp-feedback-mode-card:hover,
.mxp-feedback-mode-card:focus {
  border-color: #0f766e !important;
  background: #ecfdf5 !important;
  color: #111827 !important;
  outline: 3px solid rgba(13, 148, 136, .18);
}

.mxp-feedback-mode-card strong,
.mxp-feedback-mode-card span {
  display: block;
}

.mxp-feedback-mode-card strong {
  margin-bottom: 6px;
  font-size: 17px;
}

.mxp-feedback-mode-card span {
  color: #4b5563;
}

.mxp-feedback-video-note {
  margin: -4px 0 8px;
  color: #0f766e;
  font-weight: 700;
}

.mxp-feedback-video-preview {
  display: block;
  width: 100%;
  max-height: 280px;
  margin: 0 0 16px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #000;
}

.mxp-feedback-replace {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 10px 0;
  padding: 10px;
  border: 1px dashed #9ca3af;
  border-radius: 12px;
  background: #f8fafc;
}

.mxp-feedback-replace:focus {
  border-color: #0f766e;
  outline: 3px solid rgba(13, 148, 136, .18);
}

.mxp-feedback-replace strong,
.mxp-feedback-replace span,
.mxp-feedback-replace em {
  overflow-wrap: anywhere;
}

.mxp-feedback-replace strong {
  color: #111827;
}

.mxp-feedback-replace span {
  flex: 1 1 220px;
  color: #4b5563;
}

.mxp-feedback-replace em {
  flex: 1 1 100%;
  color: #0f766e;
  font-style: normal;
}

.mxp-feedback-replace em.is-error {
  color: #991b1b;
}

.mxp-feedback-editor-dialog {
  display: flex;
  flex-direction: column;
  width: min(1120px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  max-height: calc(100dvh - 24px);
}

.mxp-feedback-toolbar {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
  margin: 10px 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 2px;
}

.mxp-feedback-toolbar button {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 7px 10px !important;
  border: 1px solid #d1d5db !important;
  border-radius: 9px;
  background: #fff !important;
  color: #374151 !important;
  font: 700 14px/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  cursor: pointer;
}

.mxp-feedback-style-control {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 4px 8px;
  border: 1px solid #d1d5db;
  border-radius: 9px;
  background: #fff;
  color: #374151;
  font-weight: 700;
  white-space: nowrap;
}

.mxp-feedback-style-control input[type="color"] {
  width: 30px;
  height: 26px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.mxp-feedback-style-control select {
  min-height: 26px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
  font-weight: 700;
}

.mxp-feedback-toolbar button.is-active,
.mxp-feedback-toolbar button:focus,
.mxp-feedback-toolbar button:hover {
  border-color: #0f766e !important;
  background: #ecfdf5 !important;
  color: #0f766e !important;
}

.mxp-feedback-canvas-wrap {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #f9fafb;
  text-align: center;
}

.mxp-feedback-canvas {
  display: block;
  max-width: 100%;
  margin: 0 auto;
  background: #fff;
  touch-action: none;
  cursor: crosshair;
}

.mxp-feedback-primary {
  border: 1px solid #0f766e !important;
  background: #0f766e !important;
  color: #fff !important;
}

.mxp-feedback-primary:hover,
.mxp-feedback-primary:focus {
  background: #0d9488 !important;
  outline: 3px solid rgba(13, 148, 136, .2);
}

.mxp-feedback-secondary {
  border: 1px solid #d1d5db !important;
  background: #fff !important;
  color: #374151 !important;
}

.mxp-feedback-secondary:hover,
.mxp-feedback-secondary:focus {
  background: #f9fafb !important;
  outline: 3px solid rgba(107, 114, 128, .18);
}

.mxp-feedback-mask-overlay {
  position: absolute;
  z-index: 2147482999;
  pointer-events: none;
  border-radius: 4px;
  background: repeating-linear-gradient(45deg, #111827 0, #111827 8px, #374151 8px, #374151 16px);
}

.ptro-holder-wrapper,
.ptro-holder,
.ptro-wrapper,
.mxp-feedback-painterro-layer {
  z-index: 2147483647 !important;
}

.ptro-holder-wrapper {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  background: rgba(17, 24, 39, .72) !important;
  overflow: hidden !important;
  overscroll-behavior: contain;
}

.ptro-holder {
  position: fixed !important;
  top: 16px !important;
  right: 16px !important;
  bottom: 16px !important;
  left: 16px !important;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  box-sizing: border-box;
}

.ptro-wrapper {
  position: absolute !important;
  inset: 0 !important;
  overflow: hidden;
}

.ptro-bar {
  z-index: 2147483647 !important;
  background: #fff !important;
  box-shadow: 0 -8px 24px rgba(17, 24, 39, .18);
}

.ptro-bar > div {
  max-width: 100%;
  overflow-x: auto !important;
  overflow-y: hidden !important;
}

.ptro-wrapper .ptro-center-table {
  height: calc(100% - 52px) !important;
}

@media (max-width: 600px) {
  .mxp-feedback-button {
    bottom: calc(76px + env(safe-area-inset-bottom, 0px));
    padding: 10px 14px;
  }

  .mxp-feedback-modal {
    align-items: flex-end;
    padding: 10px;
  }

  .mxp-feedback-dialog {
    max-height: 88vh;
    padding: 18px;
    border-radius: 16px;
  }

  .mxp-feedback-actions {
    justify-content: stretch;
  }

  .mxp-feedback-primary,
  .mxp-feedback-secondary {
    flex: 1 1 auto;
  }

  .mxp-feedback-surface-admin {
    bottom: calc(64px + env(safe-area-inset-bottom, 0px));
  }

  .mxp-feedback-surface-admin.mxp-feedback-bottom-left {
    left: calc(12px + env(safe-area-inset-left, 0px));
  }
}
