/*
 * MGWW UI polish.
 *
 * Keep modelSpec tools enabled by default, but hide the active tool chips in
 * the composer so users see one clean Tools button. The menu opened by that
 * button is not a sibling of #tools-dropdown-button, so it remains visible.
 */
#tools-dropdown-button ~ button[role="checkbox"],
#tools-dropdown-button ~ div:has(button[role="checkbox"]),
#tools-dropdown-button ~ button[aria-haspopup="menu"]:not([aria-label]) {
  display: none !important;
}

#mgww-mmm-status-card {
  position: fixed;
  right: 24px;
  bottom: 96px;
  z-index: 70;
  display: none;
  width: min(360px, calc(100vw - 32px));
  border: 1px solid rgba(17, 24, 39, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  color: #1f2937;
  box-shadow: 0 16px 50px rgba(15, 23, 42, 0.18);
  font-size: 13px;
  line-height: 1.35;
}

#mgww-mmm-status-card.is-visible {
  display: block;
}

#mgww-mmm-status-card .mgww-mmm-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px 8px;
  font-weight: 650;
}

#mgww-mmm-status-card .mgww-mmm-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #2563eb;
}

#mgww-mmm-status-card.status-running .mgww-mmm-dot,
#mgww-mmm-status-card.status-unknown .mgww-mmm-dot {
  background: #2563eb;
  animation: mgww-mmm-pulse 1.2s ease-in-out infinite;
}

#mgww-mmm-status-card.status-completed .mgww-mmm-dot {
  background: #16a34a;
}

#mgww-mmm-status-card.status-failed .mgww-mmm-dot {
  background: #dc2626;
}

#mgww-mmm-status-card .mgww-mmm-dismiss {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: #6b7280;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

#mgww-mmm-status-card .mgww-mmm-card-body {
  padding: 0 12px 12px;
}

#mgww-mmm-status-card code {
  border-radius: 4px;
  background: rgba(15, 23, 42, 0.08);
  padding: 1px 4px;
  font-size: 12px;
}

#mgww-mmm-status-card .mgww-mmm-log,
#mgww-mmm-status-card .mgww-mmm-hint,
#mgww-mmm-status-card .mgww-mmm-top {
  margin-top: 6px;
  color: #4b5563;
}

@keyframes mgww-mmm-pulse {
  0%,
  100% {
    opacity: 0.45;
    transform: scale(0.92);
  }
  50% {
    opacity: 1;
    transform: scale(1);
  }
}

@media (max-width: 640px) {
  #mgww-mmm-status-card {
    right: 16px;
    bottom: 84px;
  }
}
