/* ── Substrate docs — brand overrides for MkDocs Material ── */

/* Exact brand blue from marketing site (--teal: #0685FF) */
:root {
  --md-accent-fg-color:              #0685FF;
  --md-accent-fg-color--transparent: rgba(6, 133, 255, 0.1);
}

/* ── Light mode ── */
[data-md-color-scheme="default"] {
  --md-typeset-a-color:  #0685FF;
  --md-default-bg-color: #FAFAFA;
}

/* Header: match marketing site bg-base-100/90 backdrop-blur-sm border-b */
[data-md-color-scheme="default"] .md-header {
  background-color: rgba(250, 250, 250, 0.9);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border-bottom: 1px solid #E4E6E7;
  box-shadow: none;
}

/* ── Dark mode ── */
[data-md-color-scheme="slate"] {
  --md-primary-fg-color:        #181A1B;
  --md-primary-bg-color:        rgba(255, 255, 255, 1);
  --md-primary-bg-color--light: rgba(255, 255, 255, 0.7);
  --md-accent-fg-color:         #1EA0FF;
  --md-typeset-a-color:         #1EA0FF;
}

/* Logo sizing */
.md-header__button.md-logo img {
  height: 1.25rem;
  width: auto;
}

/* Logo: black SVG → white in dark mode */
[data-md-color-scheme="slate"] .md-header__button.md-logo img {
  filter: invert(1);
}

/* ── Support widget ── */
#support-btn {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  background: #0685FF;
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 0.55rem 1.1rem;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(6, 133, 255, 0.35);
  transition: background 0.15s, box-shadow 0.15s;
}
#support-btn:hover {
  background: #0570d8;
  box-shadow: 0 4px 16px rgba(6, 133, 255, 0.4);
}

#support-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.4);
  align-items: flex-end;
  justify-content: flex-end;
  padding: 1.5rem;
}
#support-overlay.support-open {
  display: flex;
}

#support-modal {
  background: #fff;
  border-radius: 0.75rem;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.18);
  overflow: hidden;
}

#support-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #e5e7eb;
  font-weight: 600;
  font-size: 0.95rem;
}

#support-close {
  background: none;
  border: none;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  color: #6b7280;
  padding: 0 0.25rem;
}
#support-close:hover { color: #111; }

#support-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.25rem;
}

#support-form label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #374151;
  margin-top: 0.25rem;
}

#support-form input,
#support-form textarea {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 0.4rem;
  padding: 0.5rem 0.7rem;
  font-family: inherit;
  font-size: 0.875rem;
  color: #111;
  background: #fff;
  transition: border-color 0.15s;
  box-sizing: border-box;
}
#support-form input:focus,
#support-form textarea:focus {
  outline: none;
  border-color: #0685FF;
  box-shadow: 0 0 0 3px rgba(6, 133, 255, 0.12);
}
#support-form textarea { resize: vertical; }

#support-status {
  font-size: 0.8rem;
  min-height: 1.1rem;
}
#support-status.support-error { color: #dc2626; }

#support-submit {
  margin-top: 0.25rem;
  background: #0685FF;
  color: #fff;
  border: none;
  border-radius: 0.4rem;
  padding: 0.6rem 1rem;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
#support-submit:hover:not(:disabled) { background: #0570d8; }
#support-submit:disabled { opacity: 0.6; cursor: not-allowed; }

#support-toast {
  position: fixed;
  bottom: 5rem;
  right: 1.5rem;
  z-index: 10001;
  padding: 0.65rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  max-width: 320px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.25s, transform 0.25s;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.14);
}
#support-toast.support-toast-visible {
  opacity: 1;
  transform: translateY(0);
}
.support-toast-success { background: #166534; color: #fff; }
.support-toast-error   { background: #991b1b; color: #fff; }

/* Dark mode adjustments */
[data-md-color-scheme="slate"] #support-modal {
  background: #1e2021;
  color: #e5e7eb;
}
[data-md-color-scheme="slate"] #support-modal-header {
  border-color: #374151;
}
[data-md-color-scheme="slate"] #support-form label {
  color: #d1d5db;
}
[data-md-color-scheme="slate"] #support-form input,
[data-md-color-scheme="slate"] #support-form textarea {
  background: #111314;
  border-color: #374151;
  color: #e5e7eb;
}
