/* =========================================================
   Global typography & readability
   ========================================================= */
:root {
  --md-typeset-font-size: 1.02rem;
  --md-code-font-size: 0.9em;
}

/* Jasny motyw - nagłówek biały */
[data-md-color-scheme="default"] .md-header {
  background-color: #ffffff !important;
}

[data-md-color-scheme="default"] .md-header__button,
[data-md-color-scheme="default"] .md-header__topic,
[data-md-color-scheme="default"] .md-header__title {
  color: #000000 !important;
}

[data-md-color-scheme="default"] .md-header__button .md-icon {
  color: #000000 !important;
}

[data-md-color-scheme="default"] .md-search__input {
  background-color: rgba(0, 0, 0, 0.05) !important;
  color: #000000 !important;
}

[data-md-color-scheme="default"] .md-search__input::placeholder {
  color: rgba(0, 0, 0, 0.54) !important;
}

[data-md-color-scheme="default"] .md-search__input:hover,
[data-md-color-scheme="default"] .md-search__input:focus {
  background-color: rgba(0, 0, 0, 0.1) !important;
  color: #000000 !important;
}

[data-md-color-scheme="default"] .md-search__icon {
  color: #000000 !important;
}

/* Ciemny motyw - nagłówek jasnoszary */
[data-md-color-scheme="slate"] .md-header {
  background-color: #e0e0e0 !important;
}

[data-md-color-scheme="slate"] .md-header__button,
[data-md-color-scheme="slate"] .md-header__topic,
[data-md-color-scheme="slate"] .md-header__title {
  color: #000000 !important;
}

[data-md-color-scheme="slate"] .md-header__button .md-icon {
  color: #000000 !important;
}

/* Wyszukiwarka w trybie ciemnym - ciemniejsza z białym tekstem */
[data-md-color-scheme="slate"] .md-search__input {
  background-color: rgba(0, 0, 0, 0.3) !important;
  color: #ffffff !important;
}

[data-md-color-scheme="slate"] .md-search__input::placeholder {
  color: rgba(255, 255, 255, 0.7) !important;
}

[data-md-color-scheme="slate"] .md-search__input:hover,
[data-md-color-scheme="slate"] .md-search__input:focus {
  background-color: rgba(0, 0, 0, 0.4) !important;
  color: #ffffff !important;
}

[data-md-color-scheme="slate"] .md-search__icon {
  color: #ffffff !important;
}

/* Cień pod nagłówkiem - różny dla jasnego i ciemnego motywu */
[data-md-color-scheme="default"] .md-header {
  box-shadow: 0 0 0.2rem rgba(0,0,0,.1), 0 0.2rem 0.4rem rgba(0,0,0,.2);
}

[data-md-color-scheme="slate"] .md-header {
  box-shadow: 0 0 0.4rem rgba(0,0,0,.3), 0 0.4rem 0.8rem rgba(0,0,0,.4);
}

.md-header__topic {
  display: none;
}

/* =========================================================
   Cards, tables & code blocks – light mode
   ========================================================= */
.md-typeset pre,
.md-typeset table:not([class]),
.md-typeset .admonition {
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

/* Fix for rounded tables */
.md-typeset table:not([class]) {
  overflow: hidden;
}

/* =========================================================
   Dark mode (slate) – stronger but still subtle shadow
   ========================================================= */
[data-md-color-scheme="slate"] .md-typeset pre,
[data-md-color-scheme="slate"] .md-typeset table:not([class]),
[data-md-color-scheme="slate"] .md-typeset .admonition {
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

/* =========================================================
   Sidebar section titles
   ========================================================= */
.md-nav__title {
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
}

/* =========================================================
   Links
   ========================================================= */
.md-typeset a {
  text-decoration: none;
}

.md-typeset a:hover {
  text-decoration: none;
}

/* =========================================================
   Inline code
   ========================================================= */
.md-typeset code {
  padding: 0.15em 0.35em;
  border-radius: 4px;
}

/* =========================================================
   Admonition titles – calmer typography
   ========================================================= */
.md-typeset .admonition-title {
  font-weight: 600;
}

.md-video-close::before,
.md-image-close::before {
  content: "×";
}