/*
 * Top black bar: keep AMD lockup, divider, and product title from crowding each other
 * (matches ROCm spacing more closely on generic flavor builds).
 */
header.common-header .navbar > .main-nav .header-logo {
  flex-wrap: nowrap;
  column-gap: 0.75rem;
  align-items: center;
}

header.common-header .navbar > .main-nav .header-logo > .vr {
  flex-shrink: 0;
  margin-left: 0.35rem !important;
  margin-right: 0.85rem !important;
}

/* This file is copied over rocm_docs_theme's own _static/custom.css, so theme rules the
   header and footer rely on must be restated here. Values match rocm_docs_theme. */
.klavika-font {
  font-family: Klavika, arial, sans-serif;
  font-size: 1.375rem;
}

/* Black bar product title (klavika-font sizing above; vai-header-product handles spacing) */
header.common-header .navbar > .main-nav .header-logo a.vai-header-product {
  margin-left: 0;
  padding-left: 0.15rem;
  white-space: nowrap;
  color: inherit;
  text-decoration: none;
}

header.common-header .navbar > .main-nav .header-logo a.vai-header-product:hover {
  color: inherit;
}

/* Sidebar brand: Gen1/Gen2 second line (vai_sidebar_subtitle); nowrap, no ellipsis, clamp shrinks on narrow rail */
.bd-sidebar-primary .navbar-brand.logo.vai-sidebar-brand-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.12rem;
  max-width: 100%;
  min-width: 0;
}

.bd-sidebar-primary .navbar-brand.logo.vai-sidebar-brand-stack .logo__title {
  margin: 0 !important;
  padding: 0;
  line-height: 1.15;
  white-space: nowrap;
  font-weight: 600;
  font-size: clamp(0.66rem, 0.38rem + 0.95vw, 0.95rem);
}

.bd-sidebar-primary .navbar-brand.logo.vai-sidebar-brand-stack .logo__subtitle {
  margin: 0 !important;
  padding: 0;
  line-height: 1.15;
  white-space: nowrap;
  font-weight: 500;
  color: var(--pst-color-text-muted, #5c5c5c);
  font-size: clamp(0.56rem, 0.32rem + 0.78vw, 0.8rem);
}

/* ROCm-style tile title banners (image ships in docs/_static/images/banner-violet.jpg) */
article .sd-card-body.rocm-card-banner {
  padding-top: 0;
  padding-left: 0;
  padding-right: 0;
}

article .sd-card-body.rocm-card-banner > * {
  margin-left: 1rem;
  margin-right: 1rem;
  --rocm-color-card-banner-bg: 0 0 0;
  --rocm-color-card-banner-text: 255 255 255;
}

article .sd-card-body.rocm-card-banner .sd-card-title {
  margin: 0 !important;
  padding: 1rem !important;
  font-family: sans-serif !important;
  background-color: rgb(var(--rocm-color-card-banner-bg));
  background-image: linear-gradient(
      to right,
      rgb(var(--rocm-color-card-banner-bg) / 80%) 1rem,
      rgb(var(--rocm-color-card-banner-bg) / 15%) 10rem,
      transparent 16rem
    ),
    linear-gradient(
      to top,
      transparent,
      rgb(var(--rocm-color-card-banner-bg) / 20%) 25% 60%,
      transparent
    ),
    url(images/banner-violet.jpg);
  background-size: cover !important;
  background-position: bottom left !important;
  color: rgb(var(--rocm-color-card-banner-text)) !important;
}

article .sd-card-body.rocm-card-banner .sd-card-title * {
  color: rgb(var(--rocm-color-card-banner-text)) !important;
}

article .sd-card-body.rocm-card-banner > .sd-card-title a:hover {
  color: rgb(var(--rocm-color-card-banner-text)) !important;
}

/* Hue rotation (aligned with rocm_docs_theme custom.css) */
article .sd-card-body.rocm-hue-2 .sd-card-title {
  filter: hue-rotate(-50deg);
}
article .sd-card-body.rocm-hue-3 .sd-card-title {
  filter: hue-rotate(-75deg);
}
article .sd-card-body.rocm-hue-4 .sd-card-title {
  filter: hue-rotate(-100deg);
}
article .sd-card-body.rocm-hue-5 .sd-card-title {
  filter: hue-rotate(-125deg);
}
article .sd-card-body.rocm-hue-6 .sd-card-title {
  filter: hue-rotate(-150deg);
}
article .sd-card-body.rocm-hue-7 .sd-card-title {
  filter: hue-rotate(-175deg);
}
article .sd-card-body.rocm-hue-8 .sd-card-title {
  filter: hue-rotate(-200deg);
}
article .sd-card-body.rocm-hue-9 .sd-card-title {
  filter: hue-rotate(-225deg);
}
article .sd-card-body.rocm-hue-10 .sd-card-title {
  filter: hue-rotate(-250deg);
}
article .sd-card-body.rocm-hue-11 .sd-card-title {
  filter: hue-rotate(-275deg);
}
article .sd-card-body.rocm-hue-12 .sd-card-title {
  filter: hue-rotate(-300deg);
}

/* Subtle “see all topics” line at bottom-right of landing tiles */
article .sd-card-body.rocm-card-banner .vitis-tile-more {
  margin-top: 0.35rem !important;
  margin-bottom: 0.2rem !important;
  text-align: right;
  font-size: 0.85rem;
  line-height: 1.35;
}

article .sd-card-body.rocm-card-banner .vitis-tile-more a {
  font-weight: 500;
}
