/* Feedback widget for local review loop */
.mi-fb-root {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 99999;
  font-family: var(--font-ui, Inter, system-ui, sans-serif);
}
.mi-fb-toggle {
  border: none;
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  color: #0a0e1a;
  background: linear-gradient(135deg, #5eead4, #6fe3d8);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}
.mi-fb-panel {
  display: none;
  width: min(520px, calc(100vw - 28px));
  margin-bottom: 10px;
  background: #121a2b;
  color: #eaf0fa;
  border: 1px solid #4a5d82;
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}
.mi-fb-root.open .mi-fb-panel { display: block; }
.mi-fb-scrim {
  display: none;
}
.mi-fb-root--leave {
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.mi-fb-root--leave.open {
  pointer-events: auto;
}
.mi-fb-root--leave .mi-fb-scrim {
  display: none;
  position: absolute;
  inset: 0;
  background: rgba(10, 14, 26, 0.62);
}
.mi-fb-root--leave.open .mi-fb-scrim {
  display: block;
}
.mi-fb-root--leave .mi-fb-panel {
  position: relative;
  z-index: 1;
  margin-bottom: 0;
}
.mi-fb-panel h2 {
  margin: 0 0 4px;
  font-size: 18px;
  font-family: Fraunces, Georgia, serif;
}
.mi-fb-meta {
  margin: 0 0 10px;
  font-size: 11px;
  color: #a7b6d4;
  font-family: "JetBrains Mono", monospace;
}
.mi-fb-panel label {
  display: block;
  font-size: 12px;
  color: #c5d0e6;
  margin-bottom: 4px;
}
.mi-fb-panel select,
.mi-fb-panel textarea {
  width: 100%;
  box-sizing: border-box;
  border-radius: 8px;
  border: 1px solid #4a5d82;
  background: #0e1524;
  color: #fff;
  padding: 8px 10px;
  font: inherit;
  margin-bottom: 10px;
}
.mi-fb-panel textarea {
  min-height: 200px;
  font-size: 15px;
  line-height: 1.45;
  resize: vertical;
}
.mi-fb-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.mi-fb-actions button {
  border-radius: 8px;
  border: 1px solid #4a5d82;
  background: #0e1524;
  color: #c5d0e6;
  padding: 7px 11px;
  cursor: pointer;
  font-size: 12.5px;
}
.mi-fb-actions button.primary {
  background: #5eead4;
  color: #0a0e1a;
  border: none;
  font-weight: 600;
}
.mi-fb-status {
  margin: 8px 0 0;
  font-size: 12px;
  color: #5eead4;
  min-height: 1em;
}
.mi-fb-root.is-thanks .mi-fb-form { display: none; }
.mi-fb-root.is-thanks .mi-fb-panel {
  border-color: #5eead4;
  box-shadow: 0 12px 48px rgba(94, 234, 212, 0.28);
}
.mi-fb-thanks {
  display: none;
  text-align: center;
  padding: 28px 12px 18px;
}
.mi-fb-root.is-thanks .mi-fb-thanks {
  display: block;
}
.mi-fb-thanks-mark {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: #5eead4;
  color: #0a0e1a;
  display: grid;
  place-items: center;
  animation: mi-fb-pop 0.5s cubic-bezier(0.22, 1.45, 0.36, 1);
}
.mi-fb-thanks h2 {
  margin: 0 0 8px;
  font-size: 22px;
}
.mi-fb-thanks p {
  margin: 0;
  color: #c5d0e6;
  font-size: 15px;
  line-height: 1.45;
  max-width: 22em;
  margin-inline: auto;
}
@keyframes mi-fb-pop {
  0% { transform: scale(0.35); opacity: 0; }
  65% { transform: scale(1.14); opacity: 1; }
  100% { transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .mi-fb-thanks-mark { animation: none; }
}

/* Shell button on syllabus / dot pages (outside iframe) */
.mi-fb-shell-btn {
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: #0a0e1a;
  background: linear-gradient(135deg, #5eead4, #6fe3d8);
  border: none;
  border-radius: 8px;
  padding: 7px 12px;
  cursor: pointer;
}
.mi-fb-shell-btn:hover { filter: brightness(1.06); }

.mi-fb-root--shell .mi-fb-toggle { display: none; }

.mi-fb-kind-note {
  margin: 0 0 10px;
  font-size: 12px;
  color: #a7b6d4;
  line-height: 1.4;
}
.mi-fb-kind-note code {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: #5eead4;
}

/* Dot-page request control (light site chrome) */
.mi-fb-request-btn {
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: #0f766e;
  background: #ccfbf1;
  border: 1px solid #0d9488;
  border-radius: 10px;
  padding: 10px 16px;
  cursor: pointer;
}
.mi-fb-request-btn:hover {
  background: #99f6e4;
  border-color: #0f766e;
  color: #115e59;
}
