/* The answer to an action that wrote to the Workplace. Three pieces, shared by
   every module: the success message at the top right, the failure message in the
   centre, and the page notice on the page's top line. */

/* Success: a small card, no dimming, closes itself. */
.feedback-saved {
  position: fixed; top: 84px; right: 28px; z-index: 80;
  width: 340px; max-width: calc(100vw - 40px);
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 14px 14px 16px;
  border: 1px solid #cdeedb; border-radius: 14px;
  background: radial-gradient(160px 90px at 0% 0%, rgba(220, 247, 231, 0.95), transparent 70%), radial-gradient(160px 90px at 100% 100%, rgba(237, 233, 254, 0.8), transparent 70%), #ffffff;
  box-shadow: inset 4px 0 0 #16a34a, 0 16px 36px rgba(16, 24, 43, 0.16);
  font-family: inherit;
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.feedback-saved.is-leaving { opacity: 0; transform: translateY(-8px); }
.feedback-saved-mark { display: grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 999px; background: #16a34a; }
.feedback-saved-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.feedback-saved-heading { font-size: 11.5px; font-weight: 800; color: #10182b; }
.feedback-saved-line { font-size: 10.5px; line-height: 1.45; color: #475569; }

.feedback-close {
  display: grid; place-items: center; width: 24px; height: 24px; flex: none;
  padding: 0; border: 0; border-radius: 7px; background: transparent; cursor: pointer;
}
.feedback-close:hover, .feedback-close:focus-visible { background: #f1f3f7; outline: none; }

/* Failure: a popup over the dimmed page. Stays until closed. */
.feedback-scrim { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 20px; background: rgba(16, 24, 43, 0.45); }
.feedback-failed {
  position: relative; width: 100%; max-width: 480px;
  display: flex; gap: 14px; padding: 14px 20px;
  border: 1px solid #ece8fb; border-radius: 18px;
  background: radial-gradient(220px 140px at 0% 0%, rgba(237, 233, 254, 0.9), transparent 70%), radial-gradient(220px 140px at 100% 0%, rgba(224, 236, 255, 0.9), transparent 70%), radial-gradient(220px 140px at 0% 100%, rgba(222, 246, 238, 0.9), transparent 70%), radial-gradient(220px 140px at 100% 100%, rgba(253, 232, 240, 0.9), transparent 70%), #ffffff;
  box-shadow: 0 30px 70px rgba(16, 24, 43, 0.3);
}
.feedback-failed > .feedback-close { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border-radius: 8px; }
.feedback-failed-mark {
  display: grid; place-items: center; width: 56px; height: 56px; flex: none; border-radius: 999px;
  background: #fde4e4; box-shadow: 0 0 0 6px rgba(253, 228, 228, 0.45);
  font-size: 26px; font-weight: 800; line-height: 1; color: #dc2626;
}
.feedback-failed-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; padding-right: 18px; }
.feedback-failed-heading { margin: 0; font-size: 15px; font-weight: 800; color: #10182b; }
.feedback-failed-text { margin: 0; font-size: 11px; line-height: 1.5; color: #334155; }
.feedback-reference {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border: 1px solid #dfe2ea; border-radius: 12px; background: rgba(255, 255, 255, 0.85);
}
.feedback-reference-body { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.feedback-reference-label { font-size: 10px; color: #64748b; }
.feedback-reference-value { font-size: 12px; font-weight: 800; letter-spacing: 0.04em; color: #10182b; }
.feedback-copy {
  display: grid; place-items: center; width: 34px; height: 34px; flex: none;
  padding: 0; border: 1px solid #dfe2ea; border-radius: 9px; background: #ffffff; cursor: pointer;
}
.feedback-copy:hover, .feedback-copy:focus-visible { border-color: #c4b4f6; outline: none; }
.feedback-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; padding-top: 2px; }
.feedback-actions button {
  height: 40px; padding: 0 20px; border-radius: 11px;
  font-family: inherit; font-size: 11px; font-weight: 700; white-space: nowrap; cursor: pointer;
}
.feedback-actions .feedback-quiet { border: 1px solid #dfe2ea; background: #ffffff; color: #334155; }
.feedback-actions .feedback-primary { border: 0; background: #6d28d9; color: #ffffff; }

/* Page notice: one line of text on the page's top line, no box. Occupies no
   height of its own, so the page below does not move when it appears. */
.feedback-note-row { display: flex; justify-content: flex-end; height: 0; overflow: visible; }
.feedback-note {
  position: relative; z-index: 2; max-width: min(560px, 60%);
  display: flex; align-items: flex-start; justify-content: flex-end; gap: 6px;
  padding: 0; border: 0; background: none; font-family: inherit; text-align: right; cursor: pointer;
}
.feedback-note-text { min-width: 0; font-size: 10.5px; line-height: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feedback-note.is-open .feedback-note-text { white-space: normal; }
.feedback-note-saved .feedback-note-text { color: #15803d; }
.feedback-note-failed .feedback-note-text { color: #dc2626; }
.feedback-note svg { flex: none; margin-top: 1px; }

@media (max-width: 720px) {
  .feedback-saved { top: 72px; right: 12px; }
  .feedback-note { max-width: 100%; }
}
