/*
 * Tipografi: teks isi sedikit lebih tebal.
 * Material memuat Plus Jakarta Sans di 300/400/700 saja; tanpa face untuk 500/600
 * browser bisa menyintesis dari 400 (kurang rapi). Muat rentang variabel supaya
 * font-weight di .md-typeset pakai glif sungguhan.
 */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,400..700;1,400..700&display=swap');

/*
 * Logo: lingkaran latar di <a.md-logo>; ukuran badge = ukuran <img> (default 1.6rem).
 * Ubah hanya --iothings-logo-size bila ingin memperbesar/mengecilkan sekaligus.
 */
:root {
  --iothings-logo-size: 1.6rem;
}

/* Default Material ±400; naikkan sedikit: 500 = medium, 600 = semi-bold */
.md-typeset {
  font-weight: 500;
}

.md-typeset strong {
  font-weight: 700;
}

.md-header__button.md-logo,
.md-nav__button.md-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--iothings-logo-size);
  height: var(--iothings-logo-size);
  flex-shrink: 0;
  border-radius: 50%;
  box-sizing: border-box;
  background: linear-gradient(165deg, #ffffff 0%, #f4f7ff 55%, #eef6f2 100%);
  border: 1px solid rgba(64, 81, 181, 0.14);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.06),
    0 2px 8px rgba(0, 0, 0, 0.1);
}

.md-header__button.md-logo img,
.md-nav__button.md-logo img {
  width: var(--iothings-logo-size);
  height: var(--iothings-logo-size);
  object-fit: contain;
  display: block;
}

/*
 * Drawer (mobile): Material memakai .md-nav__title .md-nav__button img { height:100%; width:auto }
 * sehingga logo menyusut / tidak di tengah lingkaran. Kunci ke label drawer saja + timpa eksplisit.
 */
.md-nav--primary > .md-nav__title[for="__drawer"] {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.md-nav--primary > .md-nav__title[for="__drawer"] > .md-nav__button.md-logo {
  display: inline-flex !important;
  flex: 0 0 auto;
  align-self: center;
}

.md-nav--primary > .md-nav__title[for="__drawer"] > .md-nav__button.md-logo img {
  width: var(--iothings-logo-size) !important;
  height: var(--iothings-logo-size) !important;
  max-width: var(--iothings-logo-size) !important;
  max-height: var(--iothings-logo-size) !important;
  flex-shrink: 0;
}

[data-md-color-scheme="slate"] .md-header__button.md-logo,
[data-md-color-scheme="slate"] .md-nav__button.md-logo {
  background: linear-gradient(165deg, #fbfdff 0%, #f0f4f8 45%, #eef5f1 100%);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.25),
    0 2px 10px rgba(0, 0, 0, 0.2);
}

/* Ikon di navigation tabs: rapat dengan label */
.md-tabs__link svg {
  margin-right: 0.35em;
  vertical-align: -0.2em;
  flex-shrink: 0;
}

/*
 * Bayangan gambar: sedikit condong kanan-bawah, tanpa blur 0 —
 * lapisan "offset keras" (mis. 3px 4px 0) bisa terlihat seperti garis hitam
 * di tepi atas/kanan pada screenshot atau SVG dengan border-radius.
 */
.md-typeset img {
  box-shadow:
    2px 4px 10px rgba(0, 0, 0, 0.1),
    5px 12px 28px rgba(0, 0, 0, 0.12);
}

[data-md-color-scheme="slate"] .md-typeset img {
  box-shadow:
    2px 5px 14px rgba(0, 0, 0, 0.38),
    6px 14px 32px rgba(0, 0, 0, 0.32);
}

/*
 * Marketplace (catalog): foto produk lebih ramping dari inline 36rem di markdown.
 * Mengandalkan slug H1 unik halaman catalog.md.
 */
article.md-content__inner.md-typeset:has(#katalog-produk-iothingsio) img {
  max-width: 18rem !important;
  width: 100%;
  height: auto;
}

/* Sub-list: bulatan kosong (bukan dot hitam solid) */
.md-typeset ul ul {
  list-style-type: circle;
}

/* Code styling: nuansa stabilo (light mode) */
.md-typeset pre > code {
  background: #fffdf0;
}

.md-typeset code {
  background: #fff8cc;
  border: 1px solid #f2e3a3;
  border-radius: 0.25rem;
  padding: 0.05em 0.3em;
}

/* Line highlight (hl_lines) */
.md-typeset .hll {
  background-color: #fff3a3 !important;
}

/* Dark mode: tetap kontras dan tidak silau */
[data-md-color-scheme="slate"] .md-typeset pre > code {
  background: #222735;
}

[data-md-color-scheme="slate"] .md-typeset code {
  background: #3a331b;
  border-color: #655a2b;
}

[data-md-color-scheme="slate"] .md-typeset .hll {
  background-color: #5f5424 !important;
}
