/*
 * Website footer (overrides/partials/footer.html), the sidebar hierarchy of
 * the guide and the Markdown actions (overrides/partials/content.html).
 * Part of the infrared.city look for the SDK docs; site-fonts.css has the
 * notes on where the values come from.
 */

/* --- Sidebar hierarchy of the guide (integrated table of contents) -------- */
/* A light line at the left of the list, so that the teal bar of the
 * current item is easy to see. */
.md-nav.md-nav--primary .md-nav__list .md-nav__item--active .md-nav--secondary {
  border-left-color: var(--irw-gray);
}

[data-md-color-scheme="slate"] .md-nav.md-nav--primary .md-nav__list .md-nav__item--active .md-nav--secondary {
  border-left-color: #1e293b;
}

/* Chapters (H2): bold, a little larger, space above. */
.md-nav--primary .md-nav--secondary > .md-nav__list > .md-nav__item {
  margin-top: 0.7em;
}

.md-nav--primary .md-nav--secondary > .md-nav__list > .md-nav__item > .md-nav__link {
  font-weight: 700;
  font-size: 1.05em;
  color: var(--md-default-fg-color);
}

/* Sections (H3): normal weight, indented, muted. */
.md-nav--primary .md-nav--secondary .md-nav__item .md-nav__list .md-nav__link {
  font-weight: 400;
  font-size: 1em;
  padding-left: 0.6rem;
  color: var(--md-default-fg-color--light);
}

/* The current item: teal text and a thin bar at the left. */
.md-nav--primary .md-nav--secondary .md-nav__link--active,
.md-nav--primary .md-nav--secondary > .md-nav__list > .md-nav__item > .md-nav__link--active {
  color: var(--irw-primary);
  box-shadow: inset 2px 0 0 var(--irw-primary);
  padding-left: 0.5rem;
}

.md-nav--primary .md-nav--secondary .md-nav__item .md-nav__list .md-nav__link--active {
  color: var(--irw-primary);
  padding-left: 0.6rem;
}

[data-md-color-scheme="slate"] .md-nav--primary .md-nav--secondary .md-nav__link--active {
  color: #23e5e5;
  box-shadow: inset 2px 0 0 #23e5e5;
}

/* --- Markdown actions ----------------------------------------------------- */
.irw-md-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 16px;
  margin: 0 0 1em;
  font-family: var(--irw-font);
  font-size: 13px;
}

.irw-md-actions a {
  color: var(--md-typeset-a-color);
}

.irw-md-actions__copy {
  padding: 4px 12px;
  font: inherit;
  color: var(--irw-primary-dark);
  background: linear-gradient(to right, #64d9a6, #23e5e5);
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}

.irw-md-actions__copy:hover {
  background: #23e5e5;
}

.irw-md-fallback {
  width: 100%;
  height: 12em;
  margin: 0 0 1em;
  font-family: var(--md-code-font-family);
  font-size: 12px;
}

/* --- Website footer ------------------------------------------------------- */
.md-footer.irw-footer {
  position: relative;
  overflow: hidden;
  margin-top: 40px;
  padding: 50px 40px 20px;
  color: #ffffff;
  /* The website shade is 80% black over the white page: #333333. */
  background: #ffffff;
  border-radius: 40px 40px 0 0;
  font-family: var(--irw-font);
  font-size: 14px;
  line-height: 1.5;
}

@media (min-width: 640px) {
  .md-footer.irw-footer { padding: 100px 60px 20px; }
}

.irw-footer__bg {
  position: absolute;
  inset: 0;
}

.irw-footer__image {
  max-width: 1024px;
  height: 100%;
  margin-inline: auto;
  background-size: cover;
  background-position: center;
  -webkit-mask: linear-gradient(90deg, #0000, #000 30% 70%, #0000);
  mask: linear-gradient(90deg, #0000, #000 30% 70%, #0000);
}

.irw-footer__shade {
  position: absolute;
  inset: 0;
  background: #000000cc;
}

.irw-container.irw-footer__inner {
  position: relative;
  z-index: 1;
  padding-inline: 0;
}

.irw-footer a {
  color: #f8f8f8;
  text-decoration: none;
}

.irw-footer a:hover {
  color: #23e5bb;
}

.irw-footer__top {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 80px;
}

@media (min-width: 1024px) {
  .irw-footer__top { flex-direction: row; }
}

.irw-footer__brand img {
  display: block;
  width: 128px;
  height: 48px;
}

.irw-footer__claim {
  display: none;
  margin: 12px 0 0;
  font-family: var(--irw-heading-font);
  font-size: 32px;
  font-weight: 300;
  line-height: 1.2;
}

@media (min-width: 1024px) {
  .irw-footer__claim { display: block; }
}

.irw-footer__columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  padding-top: 8px;
}

/* As on the website: the columns share the free width between the logo
 * and the demo box. */
@media (min-width: 1024px) {
  .irw-footer__columns { flex: 1; grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1280px) {
  .irw-footer__columns { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.irw-footer__col h3 {
  margin: 0 0 12px;
  font-family: var(--irw-font);
  font-size: 16px;
  font-weight: 300;
  line-height: 1.2;
}

.irw-footer__col ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.irw-footer__col li {
  margin: 0 0 16px;
  font-size: 12px;
}

.irw-footer__col p {
  margin: 0;
  font-size: 12px;
  color: #f8f8f8;
}

.irw-footer .irw-footer__form {
  color: #23e5bb;
  text-decoration: underline;
}

.irw-footer__col--social {
  grid-column: 1 / -1;
  margin-top: 20px;
}

.irw-footer__social {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  max-width: 400px;
}

.irw-footer__social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  padding: 12px;
  border-radius: 20px;
  background: #00000080;
}

.irw-footer__social a:hover {
  background: #00000099;
}

.irw-footer__demo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 20px;
  background: #00000080;
  border-radius: 20px;
}

@media (min-width: 640px) {
  .irw-footer__demo { width: 220px; height: 228px; flex: none; }
}

.irw-footer__demo p {
  margin: 0;
  font-family: var(--irw-heading-font);
  font-size: 16px;
  font-weight: 300;
  line-height: 1.3;
}

.irw-footer__demo .irw-button {
  width: 100%;
  color: var(--irw-primary-dark);
}

.irw-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
  padding-top: 32px;
  opacity: 0.8;
  font-size: 12px;
  color: #ffffff80;
}

.irw-footer__bottom p {
  margin: 0;
}

.irw-footer__bottom a {
  color: #ffffff80;
}

.irw-footer__bottom a:hover {
  color: #ffffff;
}

/* The website text is a little larger from 768px. */
@media (min-width: 768px) {
  .irw-footer__col h3 { font-size: 18px; }
  .irw-footer__col li,
  .irw-footer__col p,
  .irw-footer__bottom { font-size: 14px; }
  .irw-footer__demo p { font-size: 18px; }
}

@media (min-width: 1024px) {
  .md-footer .irw-footer__claim { font-size: 44px; }
}
