/* Contio Partner Documentation - Custom Styles */
/* Using official Contio Design System colors and typography */

/* Import Contio brand fonts - Lato (body) and Bitter (headings) */
@import url('https://fonts.googleapis.com/css2?family=Bitter:wght@400;500;600;700&family=Lato:wght@300;400;500;600;700&display=swap');

/* Primary brand colors - Contio Purple */
:root {
  --md-primary-fg-color: #563fd4;        /* brand-contio-600 */
  --md-primary-fg-color--light: #7260d4; /* brand-contio-500 */
  --md-primary-fg-color--dark: #4229c7;  /* brand-contio-700 */
  --md-accent-fg-color: #897bd3;         /* brand-contio-400 */

  /* Typography - Contio brand fonts */
  --md-text-font: "Lato", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --md-code-font: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  /* Typography colors from Contio gray scale */
  --md-default-fg-color: #13191e;        /* gray-contio-900 */
  --md-default-fg-color--light: #3f4d59; /* gray-contio-700 */
  --md-default-fg-color--lighter: #6d7e8c; /* gray-contio-500 */
}

/* Dark mode adjustments */
[data-md-color-scheme="slate"] {
  --md-primary-fg-color: #7260d4;        /* brand-contio-500 */
  --md-primary-fg-color--light: #897bd3; /* brand-contio-400 */
  --md-primary-fg-color--dark: #563fd4;  /* brand-contio-600 */
  --md-accent-fg-color: #ada4e9;         /* brand-contio-300 */

  /* Dark mode backgrounds from Contio gray scale */
  --md-default-bg-color: #13191e;        /* gray-contio-900 */
  --md-default-bg-color--light: #252f38; /* gray-contio-800 */
}

/* Code block styling */
.highlight code {
  font-size: 0.85em;
}

/* Prevent aggressive word-wrapping in code blocks */
.md-typeset pre > code {
  white-space: pre;
  word-break: normal;
  overflow-x: auto;
}

/* Cards grid for feature highlights */
.grid.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.grid.cards > * {
  background: var(--md-code-bg-color);
  border-radius: 8px;
  padding: 1.5rem;
  border: 1px solid var(--md-default-fg-color--lightest);
}

.grid.cards > *:hover {
  border-color: var(--md-primary-fg-color);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Download buttons */
.md-button--primary {
  background-color: var(--md-primary-fg-color);
  border-color: var(--md-primary-fg-color);
}

.md-button--primary:hover {
  background-color: var(--md-primary-fg-color--dark);
  border-color: var(--md-primary-fg-color--dark);
}

/* Table styling */
.md-typeset table:not([class]) {
  font-size: 0.85rem;
}

.md-typeset table:not([class]) th {
  background-color: var(--md-primary-fg-color);
  color: white;
}

/* Admonition styling */
.md-typeset .admonition.note,
.md-typeset details.note {
  border-color: var(--md-primary-fg-color);
}

.md-typeset .note > .admonition-title,
.md-typeset .note > summary {
  background-color: rgba(86, 63, 212, 0.1); /* brand-contio-600 with opacity */
}

/* TypeDoc iframe */
.md-typeset iframe {
  margin-top: 1rem;
}

/* ============================================
   Header styling - Match Contio app header
   Uses dark navy gradient like the main app
   ============================================ */

/* Header background - dark navy like app */
.md-header {
  background: linear-gradient(135deg, #082139 0%, #0e2a44 100%); /* navy-contio-900 to 800 */
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

/* Header title styling */
.md-header__title {
  font-family: "Lato", sans-serif;
  font-weight: 600;
}

/* Navigation tabs - match header dark navy */
.md-tabs {
  background: linear-gradient(135deg, #0a2540 0%, #0e2a44 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.md-tabs__link {
  font-family: "Lato", sans-serif;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
}

.md-tabs__link--active,
.md-tabs__link:hover {
  color: white;
}

/* Search bar styling - match app search */
.md-search__input {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  font-family: "Lato", sans-serif;
}

.md-search__input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.md-search__input:hover,
.md-search__input:focus {
  background-color: rgba(255, 255, 255, 0.15);
}

/* ============================================
   Footer branding
   ============================================ */
.md-footer {
  background-color: #082139; /* navy-contio-900 */
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.md-footer-copyright {
  color: var(--md-footer-fg-color--lighter);
}

/* Hero section styling for homepage */
/* Use Bitter (serif) for headings to match Contio app */
.md-typeset h1,
.md-typeset h2,
.md-typeset h3,
.md-typeset h4,
.md-typeset h5,
.md-typeset h6 {
  font-family: "Bitter", Georgia, serif;
  font-weight: 600;
}

.md-typeset h1 {
  font-weight: 700;
}

/* Links styling */
.md-typeset a {
  color: var(--md-primary-fg-color);
}

.md-typeset a:hover {
  color: var(--md-primary-fg-color--dark);
}
