/* Shared styles for the multi-page AutoIntegrate documentation.
 * Used together with sub3.css which provides the site header and dropdown menu.
 */

body {
  color: #222;
  font-size: 16px;
  line-height: 1.55;
  background: #fff;
}

a { color: #0b7285; }

img { max-width: 100%; }
img:not([height]) { height: auto; }
/* keep the height given in the page, scale down without distortion on narrow screens */
img[height] { width: auto; object-fit: contain; }

/* Header, above the sticky navigation bar so that the site dropdown menu is not covered */
.header { position: relative; z-index: 10; }
.h1text h1 { margin: 0; padding-top: 4px; }
.h1text .tagline { margin: 4px 0 0; font-size: 17px; opacity: .95; }

/* Documentation navigation bar */
.docnav {
  background: #f1f1f1;
  border-bottom: 1px solid #ddd;
  position: sticky;
  top: 0;
  z-index: 5;
}
.docnav ul {
  list-style: none;
  margin: 0 auto;
  padding: 0 12px;
  max-width: 1100px;
  display: flex;
  flex-wrap: wrap;
}
.docnav a {
  display: block;
  padding: 10px 12px;
  color: #333;
  text-decoration: none;
  font-size: 15px;
  border-bottom: 3px solid transparent;
}
.docnav a:hover { background: #e4e4e4; }
.docnav a.current { border-bottom-color: #1abc9c; font-weight: bold; }

/* Page body */
.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 8px 20px 40px;
}
.page h2 {
  font-size: 24px;
  margin: 40px 0 12px;
  padding-bottom: 6px;
  border-bottom: 2px solid #1abc9c;
}
.page h3 { font-size: 19px; margin: 26px 0 8px; }
.lead { font-size: 18px; }
.muted { color: #666; font-size: 14px; }

/* Repository link box, keep visible on the first view */
.repo {
  background: #e8f8f4;
  border: 1px solid #1abc9c;
  padding: 12px 14px;
  margin: 16px 0;
}
.repo .label { font-weight: bold; display: block; margin-bottom: 6px; }
.repo .urlrow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.repo code {
  font-size: 18px;
  background: #fff;
  border: 1px solid #9ed9c3;
  padding: 4px 10px;
  user-select: all;
  word-break: break-all;
}
@media screen and (max-width: 480px) {
  .repo code { font-size: 15px; padding: 4px 6px; }
}
.repo button {
  background: #1abc9c;
  color: #fff;
  border: none;
  padding: 7px 12px;
  font-size: 14px;
  cursor: pointer;
}
.repo button:hover { background: #16a085; }
.repo .hint { display: block; margin-top: 6px; font-size: 14px; color: #444; }

/* Hero section */
.hero {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  align-items: flex-start;
  margin-top: 20px;
}
.hero .text { flex: 1 1 420px; }
.hero .image { flex: 1 1 360px; }
.hero .image img { width: 100%; }
.hero .image small { color: #666; }

.buttons { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0; }
.btn {
  display: inline-block;
  padding: 9px 16px;
  text-decoration: none;
  font-weight: bold;
  border: 2px solid #1abc9c;
  color: #0b6e4f;
}
.btn.primary { background: #1abc9c; color: #fff; }
.btn:hover { background: #16a085; border-color: #16a085; color: #fff; }

/* Video cards */
.videos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
.videos a { text-decoration: none; color: #222; }
.videos img { width: 100%; display: block; border: 1px solid #ddd; }
.videos .title { display: block; font-weight: bold; margin-top: 6px; }
.videos .desc { display: block; font-size: 14px; color: #555; }
.videos .featured img { border: 3px solid #1abc9c; }
.videos .featured .title::after {
  content: "Start here";
  margin-left: 8px;
  font-size: 12px;
  padding: 1px 7px;
  background: #1abc9c;
  color: #fff;
  vertical-align: middle;
}

/* Numbered steps */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
  counter-reset: step;
}
.steps > div {
  background: whitesmoke;
  border: 1px solid #e2e2e2;
  padding: 14px 16px 14px 56px;
  position: relative;
}
.steps > div::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 14px;
  top: 12px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #1abc9c;
  color: #fff;
  font-weight: bold;
  text-align: center;
  line-height: 30px;
}
.steps h3 { margin: 2px 0 6px; font-size: 17px; }
.steps p { margin: 0 0 6px; font-size: 15px; }

/* Processing pipeline */
.pipeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 6px;
  margin: 12px 0;
}
.pipeline a {
  text-decoration: none;
  color: #222;
  background: whitesmoke;
  border: 1px solid #ddd;
  border-top: 4px solid #1abc9c;
  padding: 8px 10px;
  font-size: 14px;
  position: relative;
}
.pipeline a:hover { background: #e8f8f4; }
.pipeline a b { display: block; font-size: 15px; }
.pipeline a.optional { border-top-color: #bbb; }
.pipeline a.final { border-top-color: #e67e22; background: #fdf3e9; }
.legend-inline { font-size: 14px; color: #555; }
.legend-inline span { display: inline-block; width: 22px; height: 4px; vertical-align: middle; margin: 0 4px 0 10px; }

/* Cards for "where next" */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}
.cards a {
  display: block;
  text-decoration: none;
  color: #222;
  border: 1px solid #ddd;
  padding: 14px 16px;
}
.cards a:hover { border-color: #1abc9c; background: #f6fcfa; }
.cards b { display: block; color: #0b7285; font-size: 17px; margin-bottom: 4px; }
.cards span { font-size: 14px; color: #555; }

/* Tables */
table.simple { border-collapse: collapse; width: 100%; margin: 10px 0; }
table.simple th, table.simple td {
  border-bottom: 1px solid #e6e6e6;
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
  font-size: 15px;
}
table.simple th { background: whitesmoke; font-size: 14px; }

/* "In short" box at the start of a page */
.inshort {
  background: whitesmoke;
  border-left: 4px solid #1abc9c;
  padding: 12px 16px;
  margin: 18px 0;
}
.inshort p { margin: 4px 0; }

/* Note and expert mode badge */
.note {
  background: #fffbe6;
  border: 1px solid #f0e2a0;
  padding: 10px 14px;
  font-size: 15px;
  margin: 12px 0;
}
.badge {
  display: inline-block;
  font-size: 12px;
  font-weight: bold;
  padding: 1px 7px;
  border-radius: 3px;
  vertical-align: middle;
  background: #fdf3e9;
  color: #a04000;
  border: 1px solid #f0c49a;
}
.badge.simple { background: #eafaf4; color: #0b6e4f; border-color: #9ed9c3; }

/* Side by side text and screenshot */
.split {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: flex-start;
}
.split > .text { flex: 1 1 380px; }
.split > .shot { flex: 0 1 auto; max-width: 100%; }

details { margin: 10px 0; }
details summary { cursor: pointer; font-weight: bold; color: #0b7285; }

/* Page footer */
.docfooter {
  border-top: 1px solid #ddd;
  margin-top: 40px;
  padding: 18px 20px;
  text-align: center;
  color: #555;
  font-size: 14px;
}
.docfooter a { margin: 0 6px; }

/* Section pages */
.page h4 { font-size: 16px; margin: 20px 0 6px; }
.page h3 { padding-top: 6px; }
.page pre { white-space: pre-wrap; word-break: break-all; background: whitesmoke; padding: 10px; }
.page table[border] { border-collapse: collapse; }

/* Table of contents at the start of a section page */
.pagetoc {
  border: 1px solid #e2e2e2;
  padding: 12px 16px;
  margin: 18px 0;
  font-size: 15px;
}
.pagetoc ul { margin: 6px 0 0; padding-left: 18px; }
.pagetoc li { margin: 5px 0; }

/* Video link at the start of a section */
.videolink {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-weight: bold;
  border: 1px solid #ddd;
  padding: 6px 14px 6px 6px;
  margin: 6px 0 10px;
}
.videolink:hover { border-color: #1abc9c; background: #f6fcfa; }
.videolink img { width: 160px; display: block; }

/* Rows of images moved from the old documentation page */
.video-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  background: #fff;
}
.video-container > div { font-size: 15px; }
