/* ============================================================
   Compact restyle — colors matched to jimmypaputto.com/blog
   ============================================================ */

/* --- Color palette (matching jimmypaputto.com shop & blog) --- */
:root,
:root[color-theme="light"] {
  --header-background: #242833;
  --header-font-color: #fff;
  --footer-background: #121212;
  --footer-font-color: #ccc;
  --footer-link-color: #6b8fd4;
  --footer-link-color-visited: #6b8fd4;
  --body-background: #fff;
  --body-font-color: #121212;
  --link-color: #334fb4;
  --link-color-visited: #2a3f8f;
  --accent-color: #e0e0e0;
  --accent-color-lite: #f3f3f3;
  --button-background: #121212;
  --button-border-color: #121212;
  --code-background: #f3f3f3;
}

@media (prefers-color-scheme: light) {
  :root {
    --header-background: #242833;
    --header-font-color: #fff;
    --footer-background: #121212;
    --footer-font-color: #ccc;
    --footer-link-color: #6b8fd4;
    --footer-link-color-visited: #6b8fd4;
    --body-background: #fff;
    --body-font-color: #121212;
    --link-color: #334fb4;
    --link-color-visited: #2a3f8f;
    --accent-color: #e0e0e0;
    --accent-color-lite: #f3f3f3;
    --button-background: #121212;
    --button-border-color: #121212;
  }
}

:root[color-theme="dark"] {
  --header-background: #1a1d24;
  --footer-background: #0e0e0e;
  --body-background: #1e2028;
  --body-font-color: #d4d4d4;
  --link-color: #6b8fd4;
  --link-color-visited: #5a7ab8;
  --accent-color: #2a2d35;
  --accent-color-lite: #23262e;
  --button-background: #334fb4;
  --button-border-color: #334fb4;
  --code-background: #23262e;
}

@media (prefers-color-scheme: dark) {
  :root {
    --header-background: #1a1d24;
    --footer-background: #0e0e0e;
    --body-background: #1e2028;
    --body-font-color: #d4d4d4;
    --link-color: #6b8fd4;
    --link-color-visited: #5a7ab8;
    --accent-color: #2a2d35;
    --accent-color-lite: #23262e;
    --button-background: #334fb4;
    --button-border-color: #334fb4;
    --code-background: #23262e;
  }
}

/* --- Compact header with larger logo --- */
.gdoc-header {
  border-bottom: 3px solid #121212;
}

.gdoc-header .container {
  padding-top: .75rem !important;
  padding-bottom: .75rem !important;
}

.gdoc-brand {
  gap: .75rem !important;
}

.gdoc-brand__title {
  font-size: 1.25rem !important;
  line-height: 1.3rem !important;
  font-weight: 600;
}

.gdoc-brand__img {
  width: auto !important;
  height: 3rem !important;
  filter: invert(1) brightness(2);
}

/* In dark mode the header is also dark, so keep it white */
:root[color-theme="dark"] .gdoc-brand__img {
  filter: invert(1) brightness(2);
}

/* --- Compact body container --- */
main.container {
  padding: .75rem 1rem !important;
}

/* --- Compact left nav (desktop only) --- ROLLBACK: commented out ---
@media screen and (min-width: 41.01rem) {
  .gdoc-nav {
    flex: 0 0 14.5rem !important;
  }

  .gdoc-nav nav {
    width: 14.5rem !important;
    padding: .5rem 1rem .5rem 0 !important;
    font-size: .8125rem;
  }
}

.gdoc-nav nav section {
  margin-top: .75rem;
}

.gdoc-nav__list li {
  margin: .3rem 0 !important;
}

.gdoc-nav__list ul {
  padding-left: .65rem !important;
}


.gdoc-nav--main > ul > li > span,
.gdoc-nav--main > ul > li > span > a,
.gdoc-nav--main > ul > li > label,
.gdoc-nav--main > ul > li > label > a {
  text-transform: uppercase;
  font-size: .7rem !important;
  letter-spacing: .04em;
  color: var(--link-color);
}


--- end ROLLBACK */
.gdoc-nav--main > ul > li {
  border-left: 2px solid var(--accent-color);
  padding-left: .5rem;
  margin-bottom: 1rem;
}

.gdoc-nav--main > ul > li:hover {
  border-left-color: var(--link-color);
}

.gdoc-nav--main > ul > li > span,
.gdoc-nav--main > ul > li > span > a,
.gdoc-nav--main > ul > li > label,
.gdoc-nav--main > ul > li > label > a {
  text-transform: uppercase;
  font-size: .7rem !important;
  letter-spacing: .04em;
}

/* --- Nav version badge --- */
.gdoc-nav__version {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .45rem .65rem;
  margin-bottom: .75rem;
  border: 1px solid var(--accent-color);
  border-radius: .35rem;
  background: var(--accent-color-lite);
  color: var(--body-font-color);
  text-decoration: none;
  transition: border-color .15s, background .15s;
}

.gdoc-nav__version:hover {
  border-color: var(--link-color);
  background: var(--body-background);
  text-decoration: none;
}

.gdoc-nav__version-icon {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  opacity: .6;
}

.gdoc-nav__version-info {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.gdoc-nav__version-label {
  font-size: .6rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--body-font-color);
  opacity: .6;
}

.gdoc-nav__version-tag {
  font-size: .8rem;
  font-weight: 600;
  font-family: monospace;
  color: #e67e22;
}

/* --- Compact content area --- */
.gdoc-page {
  padding: .5rem 0 !important;
}

.gdoc-markdown {
  line-height: 1.5rem !important;
  font-size: .9rem;
}

.gdoc-markdown h1 { font-size: 1.55rem; margin-top: .75rem; margin-bottom: .4rem; }
.gdoc-markdown h2 { font-size: 1.3rem; margin-top: 1.1rem; margin-bottom: .4rem; }
.gdoc-markdown h3 { font-size: 1.05rem; margin-top: .9rem; margin-bottom: .3rem; }

.gdoc-markdown p {
  margin: .4rem 0;
}

.gdoc-markdown ul, .gdoc-markdown ol {
  margin: .35rem 0;
}

.gdoc-markdown li {
  margin: .1rem 0;
}

/* --- Compact breadcrumb bar --- */
.gdoc-page__header {
  padding: .3rem .65rem !important;
  font-size: .78rem;
  margin-bottom: 1.25rem !important;
}

/* --- Compact tables --- */
.gdoc-markdown table {
  font-size: .825rem;
}

.gdoc-markdown table th,
.gdoc-markdown table td {
  padding: .25rem .5rem;
}

/* --- Compact code blocks --- */
.gdoc-markdown pre code {
  padding: .55rem !important;
  font-size: .78rem;
  line-height: 1.1rem;
}

.gdoc-markdown code {
  font-size: .78rem;
  padding: .1rem .2rem;
}

/* --- Compact ToC --- */
.gdoc-toc {
  margin: .4rem 0 !important;
  font-size: .78rem;
}

.gdoc-toc li {
  margin: .1rem 0 !important;
}

/* --- Compact footer --- */
.gdoc-footer {
  font-size: .78rem;
  padding: .6rem 0;
  border-top: 1px solid rgba(255,255,255,.1);
}

.gdoc-footer__content {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.gdoc-footer__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .15rem;
}

.gdoc-footer__sep {
  color: var(--footer-font-color);
  opacity: .4;
}

.gdoc-footer__link {
  color: #fff !important;
  text-decoration: none;
}

.gdoc-footer__link:hover {
  text-decoration: underline;
}

.gdoc-footer__icon-link {
  display: inline-flex;
  align-items: center;
  padding: 0 .3rem;
  opacity: .75;
  transition: opacity .15s;
}

.gdoc-footer__icon-link:hover {
  opacity: 1;
  text-decoration: none !important;
}

.gdoc-footer__icon {
  width: 1.1rem;
  height: 1.1rem;
  fill: currentColor;
}

.gdoc-footer__top {
  position: absolute;
  right: 0;
  flex-shrink: 0;
}

.gdoc-footer__top svg.gdoc-icon {
  width: 1.25rem;
  height: 1.25rem;
}

@media screen and (max-width: 41rem) {
  .gdoc-footer__content {
    flex-direction: column;
    gap: .4rem;
  }
  .gdoc-footer__row {
    justify-content: center;
  }
}

/* --- Hint / admonition compact --- */
.admonitionblock {
  margin: .5rem 0;
  font-size: .85rem;
}

/* --- Previous/Next page links --- */
.gdoc-page__footer {
  margin-top: 1.25rem;
  padding-top: .6rem;
  border-top: 1px solid var(--accent-color);
  font-size: .825rem;
}

/* --- Homepage centered title --- */
.gdoc-page > .gdoc-markdown > h1 {
  text-align: center;
}

/* --- Search box --- */
.gdoc-search input {
  border-radius: .2rem;
  font-size: .78rem;
  padding: .35rem .45rem .35rem 2rem;
}

.gdoc-search svg.gdoc-icon {
  width: 1rem;
  height: 1rem;
  top: 50%;
  transform: translateY(-50%);
  left: .5rem;
}

/* --- Header extra menu icons --- */
.gdoc-menu-header__items svg.gdoc-icon {
  width: 1.35rem;
  height: 1.35rem;
}

.gdoc-header svg.gdoc-icon {
  width: 1.75rem;
  height: 1.75rem;
}

/* --- Mobile responsive fixes --- ROLLBACK: commented out ---
@media screen and (max-width: 41rem) {
  .wrapper {
    overflow-x: hidden;
    max-width: 100vw;
  }

  .gdoc-nav {
    flex: unset !important;
  }

  main.container {
    padding: .5rem .75rem !important;
    max-width: 100vw;
    overflow-x: hidden;
  }

  .gdoc-page {
    min-width: 0 !important;
    width: 100% !important;
  }

  .gdoc-markdown pre {
    max-width: calc(100vw - 2rem);
    overflow-x: auto;
  }

  .gdoc-markdown table {
    display: block;
    max-width: calc(100vw - 2rem);
    overflow-x: auto;
  }

  .gdoc-brand__img {
    display: none;
  }

  .gdoc-brand__title {
    font-size: 1.1rem !important;
  }
}
--- end ROLLBACK */
