/* Site-wide feedback surface. Kept namespaced so it can be injected on every page. */
#dw-feedback-widget { color-scheme: light; }
/* Author display:grid/flex rules override the browser's default [hidden] rule.
   Keep every widget state self-contained on Guides and standalone pages too. */
#dw-feedback-widget[hidden],
#dw-feedback-widget [hidden] { display: none !important; }
/* Override global header/form/footer theme rules in the drawing workspace. */
#dw-feedback-widget .dwf-head {
  position: static;
  flex: 0 0 auto;
  height: auto;
  min-height: 0;
  max-height: none;
  overflow: visible;
  background: var(--dwf-card);
  color: var(--dwf-ink);
  box-shadow: none;
}
#dw-feedback-widget .dwf-title { margin: 6px 0 0; color: var(--dwf-ink); }
#dw-feedback-widget .dwf-subtitle { margin: 7px 0 0; color: var(--dwf-muted); }
#dw-feedback-widget .dwf-content form { display: block; margin: 0; padding: 0; }
#dw-feedback-widget .dwf-message,
#dw-feedback-widget .dwf-email {
  background: var(--dwf-card);
  color: var(--dwf-ink);
  border: 1px solid var(--dwf-line);
  font: inherit;
}
#dw-feedback-widget .dwf-foot {
  position: static;
  height: auto;
  min-height: 0;
  background: transparent;
  color: var(--dwf-muted);
}
#dw-feedback-widget .dwf-btn {
  background: var(--dwf-accent);
  border: 1px solid var(--dwf-accent-dark);
  color: #fff;
  min-height: 40px;
  font: inherit;
}
#dw-feedback-widget .dwf-btn-secondary,
#dw-feedback-widget .dwf-close,
#dw-feedback-widget .dwf-remove {
  background: var(--dwf-card);
  color: var(--dwf-ink);
  border: 1px solid var(--dwf-line);
}
[data-dw-feedback-root] {
  --dwf-ink: #28332d;
  --dwf-muted: #69756c;
  --dwf-paper: #f7f7f1;
  --dwf-card: #fffefa;
  --dwf-line: #d9ded5;
  --dwf-accent: #34765d;
  --dwf-accent-dark: #245a45;
  --dwf-alert: #a54132;
  color: var(--dwf-ink);
  font: 14px/1.5 var(--t-font-ui, "DM Sans", system-ui, sans-serif);
}

[data-dw-feedback-root] *,
[data-dw-feedback-root] *::before,
[data-dw-feedback-root] *::after { box-sizing: border-box; }

.dwf-bubble {
  position: fixed;
  right: max(22px, env(safe-area-inset-right));
  bottom: max(22px, env(safe-area-inset-bottom));
  z-index: 2147483000;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(37, 79, 59, .2);
  border-radius: 50%;
  padding: 8px;
  background: #f7f7f1;
  box-shadow: 0 5px 18px rgba(27, 45, 34, .2);
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease;
}
.dwf-bubble:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(27, 45, 34, .24); }
.dwf-bubble:focus-visible, .dwf-btn:focus-visible, .dwf-close:focus-visible,
.dwf-remove:focus-visible, .dwf-file-label:focus-within {
  outline: 3px solid #87b89f;
  outline-offset: 3px;
}
.dwf-bubble img { width: 100%; height: 100%; object-fit: contain; }

.dwf-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2147483001;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(26, 39, 31, .48);
  backdrop-filter: blur(3px);
}
.dwf-dialog {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(100%, 610px);
  max-height: min(850px, calc(100dvh - 44px));
  overflow: hidden;
  border: 1px solid rgba(46, 70, 53, .18);
  border-radius: 18px;
  background: var(--dwf-paper);
  box-shadow: 0 24px 70px rgba(17, 31, 22, .27);
  animation: dwf-enter .2s ease-out both;
}
@keyframes dwf-enter { from { opacity: 0; transform: translateY(9px) scale(.99); } to { opacity: 1; transform: translateY(0) scale(1); } }
.dwf-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 23px 26px 17px;
  border-bottom: 1px solid var(--dwf-line);
  background: var(--dwf-card);
}
.dwf-eyebrow { color: var(--dwf-accent); font: 700 10px/1.2 var(--t-font-mono, monospace); letter-spacing: .13em; text-transform: uppercase; }
.dwf-title { margin-top: 6px; font-size: clamp(21px, 4vw, 27px); line-height: 1.15; letter-spacing: -.035em; }
.dwf-subtitle { max-width: 440px; margin-top: 7px; color: var(--dwf-muted); font-size: 13px; }
.dwf-close {
  flex: none;
  width: 36px;
  height: 36px;
  border: 1px solid var(--dwf-line);
  border-radius: 9px;
  background: transparent;
  color: var(--dwf-ink);
  font-size: 21px;
  line-height: 1;
  cursor: pointer;
}
.dwf-content { overflow-y: auto; padding: 20px 26px 24px; }
.dwf-label { display: block; margin-bottom: 7px; font-weight: 650; }
.dwf-required-note { color: var(--dwf-muted); font-size: 12px; font-weight: 400; }
.dwf-message {
  display: block;
  width: 100%;
  min-height: 135px;
  resize: vertical;
  padding: 12px 13px;
  border: 1px solid #cbd3c9;
  border-radius: 10px;
  background: var(--dwf-card);
  color: var(--dwf-ink);
  font: inherit;
  line-height: 1.55;
}
.dwf-message:focus, .dwf-email:focus { outline: 2px solid #83ad95; outline-offset: 1px; border-color: var(--dwf-accent); }
.dwf-counter { display: flex; justify-content: space-between; margin-top: 5px; color: var(--dwf-muted); font: 11px/1.4 var(--t-font-mono, monospace); }
.dwf-capture-info {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 17px 0;
  padding: 11px 12px;
  border-left: 3px solid #7ba58b;
  border-radius: 0 8px 8px 0;
  background: #eaf0e8;
  color: #435649;
  font-size: 12px;
  line-height: 1.5;
}
.dwf-capture-info strong { color: #2e4736; }
.dwf-capture-state { margin-top: 8px; color: var(--dwf-muted); font-size: 12px; }
.dwf-capture-state[data-kind="error"], .dwf-error { color: var(--dwf-alert); }
.dwf-capture-state[data-kind="success"] { color: var(--dwf-accent-dark); }
.dwf-preview-wrap { position: relative; width: min(100%, 260px); margin-top: 11px; }
.dwf-preview {
  display: block;
  width: 100%;
  max-height: 150px;
  object-fit: cover;
  object-position: top;
  border: 1px solid var(--dwf-line);
  border-radius: 8px;
  background: var(--dwf-card);
}
.dwf-preview-meta { margin-top: 4px; color: var(--dwf-muted); font-size: 11px; }
.dwf-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(35, 51, 39, .2);
  border-radius: 50%;
  background: rgba(255, 254, 250, .96);
  color: var(--dwf-ink);
  font-size: 17px;
  cursor: pointer;
}
.dwf-attachments { margin-top: 17px; }
.dwf-file-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dwf-file-label {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 7px 11px;
  border: 1px solid #cbd3c9;
  border-radius: 8px;
  background: var(--dwf-card);
  color: var(--dwf-ink);
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}
.dwf-file-input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.dwf-limit { color: var(--dwf-muted); font-size: 11px; text-align: right; }
.dwf-file-list { display: grid; gap: 7px; margin-top: 9px; }
.dwf-file-item { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border: 1px solid var(--dwf-line); border-radius: 8px; background: var(--dwf-card); }
.dwf-file-name { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.dwf-file-size { flex: none; color: var(--dwf-muted); font: 10px var(--t-font-mono, monospace); }
.dwf-file-item .dwf-remove { position: static; flex: none; width: 25px; height: 25px; }
.dwf-email-wrap { margin-top: 16px; }
.dwf-email { width: 100%; height: 40px; padding: 8px 11px; border: 1px solid #cbd3c9; border-radius: 8px; background: var(--dwf-card); color: var(--dwf-ink); font: inherit; }
.dwf-email-hint { margin-top: 4px; color: var(--dwf-muted); font-size: 11px; }
.dwf-status { min-height: 20px; margin-top: 12px; font-size: 12px; }
.dwf-status[data-kind="error"] { color: var(--dwf-alert); }
.dwf-status[data-kind="success"] { color: var(--dwf-accent-dark); }
.dwf-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 26px;
  border-top: 1px solid var(--dwf-line);
  background: var(--dwf-card);
}
.dwf-footnote { max-width: 300px; color: var(--dwf-muted); font-size: 11px; line-height: 1.4; }
.dwf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 41px;
  padding: 9px 17px;
  border: 1px solid var(--dwf-accent-dark);
  border-radius: 9px;
  background: var(--dwf-accent-dark);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.dwf-btn:hover:not(:disabled) { background: #194b37; }
.dwf-btn:disabled { opacity: .65; cursor: wait; }
.dwf-btn-secondary { border-color: var(--dwf-line); background: transparent; color: var(--dwf-ink); }
.dwf-btn-secondary:hover:not(:disabled) { background: #edf0e9; }
.dwf-success-view { padding: 42px 30px; text-align: center; }
.dwf-success-mark { display: grid; place-items: center; width: 48px; height: 48px; margin: 0 auto 14px; border: 1px solid #b6cbb9; border-radius: 50%; color: var(--dwf-accent-dark); font-size: 25px; }
.dwf-success-view p { max-width: 360px; margin: 9px auto 22px; color: var(--dwf-muted); }
.dwf-spinner { display: inline-block; width: 13px; height: 13px; margin-right: 8px; border: 2px solid rgba(255,255,255,.45); border-top-color: #fff; border-radius: 50%; animation: dwf-spin .75s linear infinite; vertical-align: -2px; }
@keyframes dwf-spin { to { transform: rotate(360deg); } }

@media (max-width: 600px) {
  .dwf-bubble { right: max(14px, env(safe-area-inset-right)); bottom: max(14px, env(safe-area-inset-bottom)); width: 54px; height: 54px; }
  .dwf-backdrop { align-items: end; padding: 0; }
  .dwf-dialog { width: 100%; max-height: calc(100dvh - env(safe-area-inset-top)); border-radius: 17px 17px 0 0; padding-bottom: env(safe-area-inset-bottom); }
  .dwf-head { padding: 19px 19px 14px; }
  .dwf-content { padding: 17px 19px 20px; }
  .dwf-foot { padding: 13px 19px; }
  .dwf-footnote { max-width: 55%; }
}
@media (prefers-reduced-motion: reduce) {
  .dwf-bubble, .dwf-dialog { animation: none; transition: none; }
  .dwf-spinner { animation-duration: 1.5s; }
}
@media print {
  [data-dw-feedback-root] { display: none !important; }
}
