/*
 * Sophos brand theme for MkDocs Material.
 * Palette + typography from the Sophos Brand Guide (updated 6 Feb 2026):
 *   Dark Blue #001A47 · Sophos Blue #2006F7 · Cyber Blue #00EDFF
 *   Cyber Green #00F2B3 · Light Neutral #EDF2F9 · Secondary #6A889B
 * Headlines: Zalando Sans Expanded · Body: Zalando Sans (loaded by Material).
 */

@import url("https://fonts.googleapis.com/css2?family=Zalando+Sans+Expanded:wght@400;600;700&display=swap");

/* ---- Light scheme ---------------------------------------------------- */
[data-md-color-scheme="default"] {
  --md-primary-fg-color: #001a47; /* Dark Blue — header / nav */
  --md-primary-fg-color--light: #223e4c;
  --md-primary-fg-color--dark: #00102b;
  --md-primary-bg-color: #ffffff;
  --md-primary-bg-color--light: #edf2f9;

  --md-accent-fg-color: #2006f7; /* Sophos Blue — links / hover */
  --md-accent-fg-color--transparent: rgba(32, 6, 247, 0.1);

  --md-typeset-a-color: #2006f7;
}

/* ---- Dark scheme (slate) -------------------------------------------- */
[data-md-color-scheme="slate"] {
  --md-primary-fg-color: #001a47;
  --md-primary-fg-color--light: #223e4c;
  --md-primary-fg-color--dark: #00102b;

  --md-accent-fg-color: #00f2b3; /* Cyber Green pops on dark */
  --md-accent-fg-color--transparent: rgba(0, 242, 179, 0.12);

  --md-typeset-a-color: #00f2b3;
}

/* ---- Typography ------------------------------------------------------ */
.md-typeset h1,
.md-typeset h2,
.md-typeset h3,
.md-header__title {
  font-family: "Zalando Sans Expanded", "Zalando Sans", -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* ---- Platform landing-page cards ------------------------------------ */
/* Tighter grid so all platform cards fit on a single screen. */
.md-typeset .grid.cards {
  grid-gap: 0.6rem;
}

.md-typeset .grid.cards > ul {
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  margin: 0;
}

.md-typeset .grid.cards > ul > li {
  position: relative; /* anchor for the stretched-link overlay below */
  border-radius: 0.5rem;
  border: 1px solid var(--md-default-fg-color--lightest);
  padding: 0.6rem 0.85rem;
  margin: 0;
  transition: border-color 125ms, box-shadow 125ms, transform 125ms;
}

/* Make the WHOLE card a single click target, for every card variant we use:
 *  - landing-page platform cards (logo link + bottom "guide" link, same target)
 *  - "choose a method" + troubleshooting-section cards (link in the title <p>)
 *  - firewall/NAC list cards (tight list: link sits in <strong>, no <p> wrapper)
 * We stretch the FIRST element-child's link across the whole card, so the body
 * (title + description) is clickable too — not just the link text. `:first-child`
 * (not `p:first-child`) is deliberate: it matches whether the first child is a
 * <p> (most cards) or a <strong> (tight-list firewall/NAC cards). Stretching the
 * first link also covers any second link in the card (the landing card's bottom
 * "guide" link points at the same page), so one overlay is enough. */
.md-typeset .grid.cards > ul > li > :first-child a::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.md-typeset .grid.cards > ul > li > :first-child {
  margin-top: 0;
}

.md-typeset .grid.cards > ul > li > p {
  font-size: 0.78rem;
  line-height: 1.35;
  margin: 0.15rem 0;
}

.md-typeset .grid.cards > ul > li:hover {
  border-color: #00f2b3; /* Cyber Green */
  box-shadow: 0 4px 16px rgba(0, 26, 71, 0.12);
  transform: translateY(-2px);
}

/* Logos inside the platform cards.
 * Scoped under .grid.cards so it out-specifies Material's default card-image
 * rule (which otherwise stretches each logo to the full card width — that was
 * blowing the VMware Workstation / AWS marks up to 200-350px tall).
 *
 * The assets are a mix of wide wordmarks (Nutanix, vSphere, Hyper-V) and
 * compact marks (AWS, the VMware Workstation icon). Normalising on height
 * alone made the wordmarks 5-8x the footprint of the icon marks. Instead we
 * center every logo in a fixed-height band and cap BOTH axes, so the widest
 * wordmark and the smallest icon read at a comparable size. */
.md-typeset .grid.cards > ul > li > p:first-child {
  margin: 0 0 0.3rem;
}

/* A definite box + object-fit:contain is what normalises size: each logo is
 * scaled to fit a 140x32 box preserving its aspect ratio, left-aligned with
 * the card text. A definite box is also required for the viewBox-only SVGs
 * (vSphere, VirtualBox, GCP, AWS), which collapse to 0x0 when width/height
 * are auto. */
.md-typeset .grid.cards > ul > li img.platform-logo {
  display: block;
  width: 140px;
  height: 32px;
  object-fit: contain;
  object-position: left center;
}

/* ---- Hero band on the landing page ----------------------------------- */
.rta-hero {
  background: linear-gradient(120deg, #001a47 0%, #10037c 60%, #2006f7 100%);
  color: #ffffff;
  border-radius: 0.75rem;
  padding: 1.1rem 1.6rem;
  margin-bottom: 1rem;
}

.rta-hero h1 {
  color: #ffffff !important;
  font-size: 1.5rem;
  margin-top: 0;
  margin-bottom: 0.4rem;
}

.rta-hero p {
  color: #edf2f9;
  font-size: 0.9rem;
  line-height: 1.4;
  margin-bottom: 0;
  max-width: 48rem;
}

.rta-hero .rta-accent {
  color: #00f2b3; /* Cyber Green */
}

/* ---- macOS-terminal styling for fenced code blocks ------------------- */
/* Gives every fenced code block a rounded window with a title bar and the
 * three "traffic light" dots, so command snippets read like a macOS Terminal.
 * Scoped to .highlight (fenced blocks) — inline `code` is untouched. Use plain
 * fenced blocks (```bash) for the cleanest result. */
.md-typeset .highlight {
  position: relative;
  border-radius: 0.55rem;
  padding-top: 1.9rem; /* room for the title bar */
  /* Fill the whole window with the code background. Material puts the bg on the
   * inner <code>, leaving the <pre>'s default top/bottom margins showing as
   * blank bands inside the rounded box — paint .highlight to close that gap. */
  background-color: var(--md-code-bg-color);
  box-shadow: 0 2px 12px rgba(0, 26, 71, 0.1);
  overflow: hidden; /* clip the inner <pre> to the rounded corners */
}

/* drop the <pre>'s default margins so there is no blank strip above/below the
 * code inside the terminal window */
.md-typeset .highlight > pre {
  margin: 0;
}

/* the title bar */
.md-typeset .highlight::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1.9rem;
  background: #e6e9ee;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

/* the three traffic-light dots */
.md-typeset .highlight::after {
  content: "";
  position: absolute;
  top: 0.62rem;
  left: 0.85rem;
  width: 0.62rem;
  height: 0.62rem;
  border-radius: 50%;
  background: #ff5f56; /* red */
  box-shadow: 1rem 0 0 #ffbd2e, 2rem 0 0 #27c93f; /* yellow, green */
}

/* the copy button rides in the right side of the title bar */
.md-typeset .highlight > .md-clipboard {
  top: 0.2rem;
  color: var(--md-default-fg-color--light);
}

/* dark scheme: darker title bar, lighter divider */
[data-md-color-scheme="slate"] .md-typeset .highlight::before {
  background: #2a2c30;
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

/* ---- Verification / freshness badge (LOCAL/MAINTAINER ONLY) ----------- */
/* Rendered by overrides/main.html ONLY on non-public builds (local serve/build).
 * The CI publish build sets MKDOCS_PUBLIC=1 so this never ships externally.
 * Colors: validated = green · reviewed = Sophos Blue · researched = amber · draft = grey */
.rta-verified {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin: 0 0 1rem;
  padding: 0.45rem 0.7rem;
  border-radius: 0.4rem;
  border: 1px solid var(--md-default-fg-color--lightest);
  font-size: 0.72rem;
}

.rta-verified__badge {
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
  font-size: 0.66rem;
  padding: 0.12rem 0.45rem;
  border-radius: 0.25rem;
  color: #ffffff;
  white-space: nowrap;
}

.rta-verified__meta {
  color: var(--md-default-fg-color--light);
}

.rta-verified__meta code {
  font-size: 0.9em;
}

.rta-verified--validated {
  border-color: rgba(0, 191, 138, 0.4);
  background: rgba(0, 242, 179, 0.08);
}
.rta-verified--validated .rta-verified__badge {
  background: #00875a;
}

.rta-verified--reviewed {
  border-color: rgba(32, 6, 247, 0.3);
  background: rgba(32, 6, 247, 0.06);
}
.rta-verified--reviewed .rta-verified__badge {
  background: #2006f7;
}

.rta-verified--researched {
  border-color: rgba(193, 120, 0, 0.4);
  background: rgba(255, 189, 46, 0.12);
}
.rta-verified--researched .rta-verified__badge {
  background: #b9770e;
}

.rta-verified--draft .rta-verified__badge {
  background: #6a889b;
}
