/* PathReport feedback widget – production UI. Telegram token is never used in frontend code. */
:root{
  --pr-feedback-z: 9990;
  --pr-feedback-blue: #2563eb;
  --pr-feedback-cyan: #0891b2;
  --pr-feedback-ink: #142033;
  --pr-feedback-muted: #64748b;
  --pr-feedback-line: rgba(99,116,139,.20);
  --pr-feedback-panel: rgba(255,255,255,.96);
  --pr-feedback-shadow: 0 22px 60px rgba(15,23,42,.20);
}
.prFeedbackWidget, .prFeedbackWidget *{box-sizing:border-box}
.prFeedbackWidget{
  position:fixed;
  right:18px;
  bottom:18px;
  z-index:var(--pr-feedback-z);
  font-family:Inter,"Segoe UI",Arial,sans-serif;
  color:var(--pr-feedback-ink);
}
.prFeedbackButton{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:10px;
  width:300px;
  max-width:calc(100vw - 36px);
  min-height:50px;
  padding:9px 15px 9px 10px;
  border:1px solid rgba(255,255,255,.62);
  border-radius:999px;
  color:#fff;
  background:linear-gradient(135deg,var(--pr-feedback-blue),var(--pr-feedback-cyan));
  box-shadow:0 16px 34px rgba(37,99,235,.28), 0 5px 16px rgba(15,23,42,.12);
  cursor:pointer;
  transition:width .58s cubic-bezier(.19,1,.22,1), max-width .58s cubic-bezier(.19,1,.22,1), padding .58s cubic-bezier(.19,1,.22,1), transform .22s ease, box-shadow .22s ease, opacity .22s ease;
  text-align:left;
  overflow:hidden;
}
.prFeedbackButton:hover{transform:translateY(-1px);box-shadow:0 18px 36px rgba(37,99,235,.30), 0 6px 16px rgba(15,23,42,.13)}
.prFeedbackButton:focus-visible{outline:3px solid rgba(37,99,235,.22);outline-offset:3px}
.prFeedbackIcon{
  width:32px;
  height:32px;
  border-radius:50%;
  display:grid;
  place-items:center;
  flex:0 0 auto;
  background:rgba(255,255,255,.18);
  border:1px solid rgba(255,255,255,.32);
  font-size:19px;
  font-weight:650;
  line-height:1;
}
.prFeedbackText{
  display:flex;
  flex-direction:column;
  gap:1px;
  min-width:0;
  line-height:1.08;
  white-space:normal;
  transition:opacity .34s ease .06s, transform .54s cubic-bezier(.19,1,.22,1), max-width .58s cubic-bezier(.19,1,.22,1);
}
.prFeedbackText strong{font-size:12.2px;font-weight:500;letter-spacing:-.01em}
.prFeedbackText span{font-size:11.5px;font-weight:400;opacity:.82}

/* Constructor pages: keep only the small ? button by default so it does not cover output panels. */
.prFeedbackWidget.is-protocol .prFeedbackButton,
.prFeedbackWidget.is-compact .prFeedbackButton{
  width:56px;
  max-width:56px;
  height:56px;
  min-height:56px;
  padding:0;
  justify-content:center;
  gap:0;
}
.prFeedbackWidget.is-protocol .prFeedbackIcon,
.prFeedbackWidget.is-compact .prFeedbackIcon{
  width:40px;
  height:40px;
  font-size:23px;
}
.prFeedbackWidget.is-protocol .prFeedbackText,
.prFeedbackWidget.is-compact .prFeedbackText{
  opacity:0;
  width:0;
  max-width:0;
  overflow:hidden;
  transform:translateX(8px);
  pointer-events:none;
}

/* Constructor pages stay compact; no hover expansion to avoid distracting the working UI. */


.prFeedbackPanel{
  position:absolute;
  right:0;
  bottom:66px;
  width:min(384px, calc(100vw - 28px));
  padding:14px;
  border:1px solid rgba(203,213,225,.72);
  border-radius:22px;
  background:var(--pr-feedback-panel);
  box-shadow:var(--pr-feedback-shadow);
  backdrop-filter:blur(14px);
  transform-origin:right bottom;
}
.prFeedbackPanel[hidden]{display:none!important}
.prFeedbackHeader{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:10px}
.prFeedbackTitle{margin:0;font-size:16px;line-height:1.15;font-weight:720;letter-spacing:-.025em;color:var(--pr-feedback-ink)}
.prFeedbackLead{margin:4px 0 0;font-size:12.4px;line-height:1.34;color:var(--pr-feedback-muted);font-weight:430}
.prFeedbackClose{
  width:30px;height:30px;border:0;border-radius:12px;background:rgba(100,116,139,.10);color:#475569;cursor:pointer;font-size:20px;line-height:1;display:grid;place-items:center;flex:0 0 auto;
}
.prFeedbackClose:hover{background:rgba(100,116,139,.16)}
.prFeedbackField{display:flex;flex-direction:column;gap:5px;margin-top:10px}
.prFeedbackField label{font-size:12px;font-weight:560;color:#334155}
.prFeedbackField input[type="text"], .prFeedbackField textarea{
  width:100%;
  border:1px solid var(--pr-feedback-line);
  border-radius:14px;
  background:#fff;
  color:var(--pr-feedback-ink);
  font:400 13px/1.35 Inter,"Segoe UI",Arial,sans-serif;
  padding:10px 11px;
  outline:none;
  transition:border-color .14s ease, box-shadow .14s ease;
}
.prFeedbackField textarea{min-height:108px;resize:vertical}
.prFeedbackField input::placeholder, .prFeedbackField textarea::placeholder{
  color:rgba(51,65,85,.52);
  font-weight:400;
}
.prFeedbackField input[type="text"]:focus, .prFeedbackField textarea:focus{border-color:rgba(37,99,235,.55);box-shadow:0 0 0 3px rgba(37,99,235,.12)}
.prFeedbackFile{
  display:flex;
  align-items:center;
  gap:9px;
  min-height:42px;
  padding:8px 10px;
  border:1px dashed rgba(100,116,139,.35);
  border-radius:14px;
  background:rgba(248,250,252,.92);
}
.prFeedbackFile input{width:100%;font-size:12px;color:#475569}
.prFeedbackFileName{font-size:11.5px;color:#64748b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:150px}
.prFeedbackFileList{display:none;margin-top:6px;font-size:11.4px;line-height:1.35;color:#64748b}
.prFeedbackFileList.has-files{display:block}
.prFeedbackClearFiles{display:none;margin-top:6px;border:0;background:transparent;color:#2563eb;padding:0;font-size:11.5px;cursor:pointer}
.prFeedbackClearFiles.is-visible{display:inline-block}
.prFeedbackClearFiles:hover{text-decoration:underline}
.prFeedbackFile.has-file{border-color:rgba(37,99,235,.42);background:rgba(239,246,255,.92)}
.prFeedbackHint{font-size:11.5px;line-height:1.35;color:#64748b;margin-top:4px}
.prFeedbackPasteHint{font-size:11.2px;line-height:1.35;color:#64748b;margin-top:5px}
.prFeedbackActions{display:flex;align-items:center;justify-content:flex-end;gap:10px;margin-top:13px}
 .prFeedbackSubmit:disabled{opacity:.72;cursor:wait;box-shadow:none}
.prFeedbackSubmit{
  border:0;
  border-radius:14px;
  min-height:40px;
  padding:0 15px;
  color:#fff;
  background:linear-gradient(135deg,var(--pr-feedback-blue),var(--pr-feedback-cyan));
  box-shadow:0 12px 22px rgba(37,99,235,.22);
  cursor:pointer;
  font-size:13px;
  font-weight:560;
}
.prFeedbackCancel{
  border:1px solid rgba(100,116,139,.18);
  border-radius:14px;
  min-height:40px;
  padding:0 13px;
  color:#475569;
  background:#fff;
  cursor:pointer;
  font-size:13px;
  font-weight:550;
}
.prFeedbackActionsButtons{display:flex;align-items:center;justify-content:flex-end;gap:9px;flex-wrap:wrap}
.prFeedbackStatus{min-height:18px;margin-top:9px;font-size:12px;line-height:1.3;color:#64748b;font-weight:500}
.prFeedbackStatus.ok{color:#047857}.prFeedbackStatus.err{color:#b91c1c}


/* Home page: show full text only when there is enough free side space.
   At desktop widths below 1850px it becomes a compact ? button to avoid covering cards. */
@media(max-width:1850px){
  .prFeedbackWidget.is-home .prFeedbackButton{
    width:56px;
    max-width:56px;
    height:56px;
    min-height:56px;
    padding:0;
    justify-content:center;
    gap:0;
  }
  .prFeedbackWidget.is-home .prFeedbackIcon{
    width:40px;
    height:40px;
    font-size:23px;
  }
  .prFeedbackWidget.is-home .prFeedbackText{
    display:none;
  }
}

/* If there is not enough side space, even the home page falls back to the small ? button. */
@media(max-width:1180px){
  .prFeedbackWidget{right:14px;bottom:14px}
  .prFeedbackButton{
    width:54px;
    max-width:54px;
    height:54px;
    min-height:54px;
    padding:0;
    justify-content:center;
    gap:0;
  }
  .prFeedbackIcon{width:38px;height:38px;font-size:22px}
  .prFeedbackText{display:none}
  .prFeedbackPanel{bottom:64px;width:calc(100vw - 28px);max-height:calc(100vh - 88px);overflow:auto;border-radius:20px}
}
@media(max-width:430px){
  .prFeedbackWidget{right:12px;bottom:12px}
  .prFeedbackButton{width:50px;max-width:50px;height:50px;min-height:50px}
  .prFeedbackIcon{width:36px;height:36px;font-size:21px}
}
@media(prefers-reduced-motion:reduce){
  .prFeedbackButton,.prFeedbackText{transition:none!important}
  .prFeedbackButton:hover{transform:none}
}


.prFeedbackSuccess{
  padding:22px 10px 16px;
  text-align:center;
}
.prFeedbackSuccess[hidden]{display:none!important}
.prFeedbackSuccessIcon{
  width:42px;
  height:42px;
  margin:0 auto 11px;
  border-radius:50%;
  display:grid;
  place-items:center;
  color:#fff;
  background:linear-gradient(135deg,var(--pr-feedback-blue),var(--pr-feedback-cyan));
  box-shadow:0 12px 22px rgba(37,99,235,.18);
  font-size:23px;
  font-weight:650;
}
.prFeedbackSuccessTitle{
  font-size:14.2px;
  line-height:1.25;
  font-weight:620;
  color:var(--pr-feedback-ink);
}
.prFeedbackSuccessText{
  margin-top:7px;
  font-size:12.4px;
  line-height:1.35;
  color:var(--pr-feedback-muted);
  font-weight:430;
}

@media(max-width:430px){
  .prFeedbackActionsButtons{width:100%;}
  .prFeedbackCancel,.prFeedbackSubmit{flex:1 1 auto;}
}


.prFeedbackToast{
  position:absolute;
  right:0;
  bottom:66px;
  width:min(360px, calc(100vw - 28px));
  padding:13px 15px;
  border:1px solid rgba(203,213,225,.72);
  border-radius:18px;
  background:rgba(255,255,255,.97);
  box-shadow:0 18px 46px rgba(15,23,42,.18);
  backdrop-filter:blur(14px);
}
.prFeedbackToast[hidden]{display:none!important}
.prFeedbackToastTitle{
  font-size:13px;
  line-height:1.28;
  font-weight:620;
  color:#047857;
}
.prFeedbackToastText{
  margin-top:4px;
  font-size:12px;
  line-height:1.35;
  font-weight:430;
  color:#64748b;
}
@media(max-width:1180px){
  .prFeedbackToast{bottom:64px;width:calc(100vw - 28px);}
}
