.llm-brief-copy-button {
  margin: 0.75rem 0 1.5rem;
  padding: 0.7rem 1rem;
  border: 1px solid rgba(99, 102, 241, 0.24);
  border-radius: 999px;
  background: linear-gradient(135deg, #312e81, #7c3aed);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(49, 46, 129, 0.16);
}

.docs-action-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0.75rem 0 1.5rem;
}

.docs-action-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.7rem 1rem;
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: rgb(67, 56, 202);
  font-weight: 600;
  text-decoration: none;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease,
    background-color 0.2s ease;
  box-shadow: 0 8px 18px rgba(79, 70, 229, 0.08);
}

.docs-action-link:hover {
  transform: translateY(-2px);
  border-color: rgba(79, 70, 229, 0.32);
  background: rgba(238, 242, 255, 0.95);
  box-shadow: 0 12px 24px rgba(79, 70, 229, 0.12);
}

.llm-brief-copy-button:hover {
  filter: brightness(1.08);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(49, 46, 129, 0.24);
}

.llm-brief-copy-button:active {
  transform: translateY(0);
}

.llm-brief-copy-button.copied {
  background: linear-gradient(135deg, #059669, #10b981);
  border-color: rgba(16, 185, 129, 0.24);
}

.md-typeset code {
  border-radius: 0.35rem;
}

#custom-toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 999999;
  pointer-events: none;
}

.custom-toast {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  border-radius: 12px;
  background: rgba(49, 46, 129, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(124, 58, 237, 0.3);
  color: #ffffff;
  font-weight: 500;
  font-size: 0.85rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  opacity: 0;
  transform: translateY(1.5rem) scale(0.95);
  transition: opacity 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.custom-toast.success {
  border-left: 4px solid #10b981;
}

.custom-toast.error {
  border-left: 4px solid #ef4444;
  background: rgba(127, 29, 29, 0.95);
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.custom-toast.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.custom-toast.fade-out {
  opacity: 0;
  transform: translateY(-1rem) scale(0.9);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast-icon {
  font-size: 1rem;
  font-weight: bold;
}

.custom-toast.error .toast-icon {
  color: #fca5a5;
}

.llm-brief-copy-button.copy-failed {
  background: linear-gradient(135deg, #dc2626, #ef4444);
  border-color: rgba(239, 68, 68, 0.24);
}

mark {
  background-color: rgba(124, 58, 237, 0.2) !important;
  color: #7c3aed !important;
  border-radius: 2px;
  padding: 0 2px;
}

[data-md-color-scheme="slate"] .docs-action-link {
  background: rgba(30, 41, 59, 0.85);
  border-color: rgba(129, 140, 248, 0.3);
  color: rgb(199, 210, 254);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.28);
}

[data-md-color-scheme="slate"] .docs-action-link:hover {
  background: rgba(49, 46, 129, 0.35);
}

[data-md-color-scheme="slate"] .llm-brief-copy-button {
  border-color: rgba(129, 140, 248, 0.45);
  background: linear-gradient(135deg, #4f46e5, #8b5cf6);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.4);
}

[data-md-color-scheme="slate"] .llm-brief-copy-button:hover {
  filter: brightness(1.12);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.48);
}

@media (max-width: 640px) {
  .docs-action-bar {
    flex-direction: column;
  }

  .docs-action-link,
  .llm-brief-copy-button {
    width: 100%;
  }

  #custom-toast-container {
    bottom: calc(1.5rem + env(safe-area-inset-bottom));
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: max-content;
    max-width: 90%;
    align-items: center;
  }

  .custom-toast {
    width: auto;
    max-width: 100%;
    justify-content: flex-start;
    border-radius: 99px; /* Capsule shape */
    padding: 0.6rem 1.2rem;
    box-sizing: border-box;
  }
}
