/* Red/black/white palette and clear, high-contrast typography */
:root {
  --brand-red: #e41e26;
  --brand-black: #141414;
  --brand-dark: #1f1f1f;
  --brand-gray: #f5f5f5;
  --brand-text: #111;
  --brand-link: #e41e26;
  --brand-link-hover: #a31217;
}

body {
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color: var(--brand-text);
  background: white;
}

h1, h2, h3, h4, h5 {
  color: var(--brand-black);
  letter-spacing: 0.02em;
}

a {
  color: var(--brand-link);
}

a:hover, a:focus {
  color: var(--brand-link-hover);
  text-decoration: none;
}

.md-main__inner {
  background: white;
}

.admonition {
  border-left-width: 6px;
  border-radius: 4px;
}

.admonition.tip {
  border-color: var(--brand-red);
}

code, pre {
  font-family: "Cascadia Code", "Fira Code", Consolas, monospace;
}

table {
  border: 1px solid #ddd;
}

th {
  background: var(--brand-black);
  color: white;
}

td, th {
  padding: 0.5rem 0.75rem;
}

/* Top navigation: white background, black links, logo on the left */
.navbar,
.navbar-default,
.navbar-inverse {
  background: white !important;
  border: none;
  border-bottom: 3px solid var(--brand-red);
}

.navbar .navbar-brand,
.navbar-default .navbar-brand,
.navbar-inverse .navbar-brand {
  background: url("../img/cbi-logo.png") left center no-repeat;
  background-size: 220px auto; /* enlarge logo */
  min-height: 70px;
  padding-left: 240px;
  color: transparent !important; /* hide title text */
  font-size: 0; /* hide the text but keep accessible link */
  line-height: 70px;
}

.navbar .navbar-nav > li > a,
.navbar-default .navbar-nav > li > a,
.navbar-inverse .navbar-nav > li > a {
  color: var(--brand-black) !important;
  font-weight: 600;
}

.navbar .navbar-nav > li > a:hover,
.navbar-default .navbar-nav > li > a:hover,
.navbar-inverse .navbar-nav > li > a:hover {
  color: var(--brand-red) !important;
}

/* Breadcrumb / header tweaks */
.breadcrumb {
  background: rgb(156, 156, 156);
}

/* Hide the built-in title text to avoid overlap with the logo */
.md-header__title,
.md-header-nav__title {
  display: none;
}

/* Inline code cleanup inside lists */
li code,
p code {
  background: #f0f0f0;
  padding: 0.1rem 0.25rem;
  border-radius: 4px;
}

/* Simplify top nav: hide tab bar and show dropdown */
.md-tabs {
  display: none;
}

.nav-dropdown-wrapper {
  position: absolute;
  right: 20px;
  top: 14px;
  z-index: 50;
}

.nav-dropdown {
  padding: 8px 12px;
  border: 1px solid var(--brand-red);
  border-radius: 6px;
  background: var(--brand-red);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  min-width: 120px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  cursor: pointer;
  opacity: 1 !important;
  visibility: visible !important;
  background-image:
    linear-gradient(45deg, transparent 50%, #fff 50%),
    linear-gradient(135deg, #fff 50%, transparent 50%),
    linear-gradient(to right, var(--brand-red), var(--brand-red));
  background-position:
    calc(100% - 22px) calc(50% - 3px),
    calc(100% - 14px) calc(50% - 3px),
    0 0;
  background-size:
    6px 6px,
    6px 6px,
    100% 100%;
  background-repeat: no-repeat;
}
