/* Server-rendered component and project pages. Matches the look of the Angular pages they replace. */

* { box-sizing: border-box; }

body {
  margin: 0;
  background: #fff;
  color: rgba(0, 0, 0, 0.87);
  font-family: Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
}

a { color: rgb(9, 105, 218); }

.icon { width: 24px; height: 24px; flex: none; fill: currentColor; }
.icon.bulb { color: #6A5ACD; }

/* Toolbar */
.toolbar {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fff;
  border-bottom: 1px solid lightgray;
}

.toolbar-inner {
  display: flex;
  align-items: center;
  height: 80px;
  padding: 0 16px;
}

.brand { display: inline-flex; align-items: center; color: gray; text-decoration: none; }
.brand img { width: 35px; height: 35px; }
.brand-text { display: flex; flex-direction: column; margin-left: 20px; }
.brand-name { font-size: 26px; line-height: 1.2; }
.brand-tagline { font-size: 12px; line-height: 12px; margin-top: 5px; }

.primary-button {
  display: inline-block;
  padding: 0 16px;
  line-height: 36px;
  border-radius: 4px;
  background: #3f51b5;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.0892857143em;
  text-decoration: none;
}

.primary-button:hover { background: #3949ab; }
.launch { display: none; margin-left: auto; }

@media (min-width: 576px) {
  .launch { display: inline-block; }
}

/* Breadcrumbs */
.breadcrumbs { margin: 10px 15px 0; font-size: 15px; }
.breadcrumbs a { color: blue; }
.breadcrumbs a:hover { text-decoration: none; }

/* Page body */
.documentation-container { padding: 0 25px 40px; }

@media (min-width: 576px) {
  .documentation-container { padding-left: 50px; padding-right: 50px; }
}

@media (min-width: 992px) {
  .documentation-container { padding-left: 100px; padding-right: 100px; }
}

.heading-container,
.markdown,
.examples {
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}

.heading-container h1 { font-size: 35px; line-height: 1.25; font-weight: 400; margin: 24px 0 0; }
.message { padding-top: 40px; }

.part-image { display: block; margin-top: 50px; max-width: min(250px, 100%); max-height: 250px; border-radius: 5px; }
.project-image { display: block; margin-top: 20px; max-width: min(500px, 100%); max-height: 500px; border-radius: 5px; }
.heading-container .primary-button { margin-top: 20px; }

.open-in-cirkit {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 15px;
  padding: 10px;
  border-radius: 9999px;
  background-color: rgba(234, 238, 246, 1);
  color: inherit;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
}

@keyframes waveScroll {
  0% { background-position: 200% 50%; }
  100% { background-position: 0% 50%; }
}

.open-in-cirkit:hover {
  background: repeating-linear-gradient(135deg, rgba(148,197,255,0.4) 0%, rgba(148,197,255,0.4) 10%, rgba(138,187,255,1) 40%,
    rgba(138,187,255,1) 60%, rgba(148,197,255,0.4) 90%, rgba(148,197,255,0.4) 100%);
  background-size: 200% 100%;
  animation: waveScroll 2s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  .open-in-cirkit:hover { animation: none; }
}

/* Anchors, including the guide's own headings, sit below the sticky toolbar when scrolled to. */
.anchor,
#examples,
.markdown :is(h1, h2, h3, h4, h5, h6) { scroll-margin-top: 90px; }

/* Article */
.markdown { margin-top: 20px; font-size: 14px; overflow-wrap: break-word; }
.markdown h2 { color: #6A5ACD; }
.markdown img { max-width: 100%; height: auto; }

.markdown pre {
  overflow-x: auto;
  white-space: pre;
  padding: 1em;
  border-radius: 8px;
  background: #0d1117;
  color: #c9d1d9;
}

.markdown pre,
.markdown pre code {
  font-family: Consolas, Monaco, "Courier New", monospace;
  font-size: 14px;
}

.markdown pre code.hljs { padding: 0; background: transparent; }

.markdown :not(pre) > code {
  padding: 0.1em 0.3em;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.06);
}

.table-scroll { overflow-x: auto; }

.markdown table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 16px;
  text-align: left;
  border: 1px solid rgba(0, 0, 0, 0.15);
}

.markdown th,
.markdown td {
  padding: 12px 15px;
  border: 1px solid rgba(0, 0, 0, 0.15);
}

.markdown th { background-color: rgba(0, 0, 0, 0.1); }

/* Example projects */
.examples { margin-bottom: 40px; font-size: 16px; }
.examples-heading { display: flex; align-items: center; gap: 8px; }
.examples-heading h2 { color: #6A5ACD; }

.projects-info-banner {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 20px;
  padding: 15px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background-color: #f9f9f9;
  color: #333;
  font-size: 1rem;
}

.project-card {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 20px;
  padding: 20px;
  border: 1.5px solid rgba(0, 0, 0, 0.12);
  border-radius: 10px;
}

.card-image { order: 1; width: fit-content; }
.card-body { order: 0; min-width: 0; }

.card-image img {
  display: block;
  width: 150px;
  border-radius: 5px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-image img:hover {
  cursor: zoom-in;
  transform: scale(1.05);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.project-title { font-size: 17px; font-weight: 500; text-decoration: none; }
.project-title:hover { text-decoration: underline; }
.card-body p { margin: 10px 0 0; font-size: 14px; }
.card-body .open-in-cirkit { margin-top: 10px; }

@media (min-width: 992px) {
  .project-card { flex-direction: row; gap: 20px; }
  .card-image { order: 0; flex: none; }
  .card-body { order: 1; }
  .card-image img { width: 300px; }
}
