/* html,
body,
h1 {
  background-color: #8eccff;
}
 */



/* usage in html:
<link href="ave_md.css" rel="stylesheet"> 
*/

@charset "UTF-8";
@font-face {
  font-family: Fira Sans;
  font-weight: 400;
  src: url(fonts/FiraSans-Regular.otf);
}

@font-face {
  font-family: Fira Sans;
  font-style: italic;
  font-weight: 400;
  src: url(fonts/FiraSans-Italic.otf);
}

@font-face {
  font-family: Fira Sans;
  font-weight: 300;
  src: url(fonts/FiraSans-Light.otf);
}

@font-face {
  font-family: Fira Sans;
  font-style: italic;
  font-weight: 300;
  src: url(fonts/FiraSans-LightItalic.otf);
}

@font-face {
  font-family: Fira Sans;
  font-weight: bold;
  src: url(fonts/FiraSans-Bold.otf);
}

@font-face {
  font-family: Source Code Pro;
  font-weight: 400;
  src: url(fonts/SourceCodePro-Regular.ttf);
}

@page {
  /* size: Letter; Change from the default size of A4 */
  /* size: A3 landscape; */
  /* size: A4 landscape; */
  margin: 2cm;
  padding: 0.5cm 0 0 0;
  /* counter-reset: page 3; */
}

/* nagłówek */
@page {
  @top-left {
    content: "";
    background-image: url("avendi_logo_header_bk.png");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: right;
    height: 0.5cm;
    vertical-align: middle;
    width: 100%;
  }
  @top-center {
    background: #2ca0ff;
    content: "";
    display: block;
    height: 0.03cm;
    /* opacity: .5; */
    width: 100%;
  }
  @top-right {
    content: "";
    height: 1cm;
    text-align: center;
    width: 1cm;
  }
}



/* footer */
@page {
  @bottom-left {
    color: #00182e;
    content: string(title);
    font-size: 8pt;
    vertical-align: top;
    display: block;
    width: 100%;
  }
  @bottom-center {
    background: #8eccff;
    color: #00182e;
    content: "";
    display: block;
    height: 0.03cm;
    vertical-align: top;
    font-size: 8pt;
    /* opacity: .5; */
    width: 100%;
  }
  @bottom-right {
    background: #8eccff;
    content: counter(page);
    height: 1cm;
    text-align: center;
    width: 1cm;
  }
}

html,
body {
  font-family: var(
    --markdown-font-family,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe WPC",
    "Segoe UI",
    system-ui,
    "Ubuntu",
    "Droid Sans",
    sans-serif
  );
  font-size: var(--markdown-font-size, 14px);
  padding: 0 26px;
  line-height: var(--markdown-line-height, 22px);
  word-wrap: normal;
}

body {
  padding-top: 1em;
  overflow-x: hidden;
  position: relative;
}

/* Reset margin top for elements */
h1,
h2,
h3,
h4,
h5,
h6,
p,
ol,
ul,
pre {
  margin-top: 0;
}

h1 {
  margin: 2em 0 1em 0;
}

h2,
h3,
h4,
h5,
h6 {
  font-weight: normal;
  margin-top: 0.8em;
  margin-bottom: 0.5em;
}

p {
  margin-bottom: 0.7em;
}

ul,
ol {
  margin-bottom: 0.7em;
}

hr {
  border: 0;
  height: 2px;
  border-bottom: 2px solid;
}

h1 {
  padding-bottom: 0.3em;
  line-height: 1.2;
  border-bottom-width: 1px;
  border-bottom-style: solid;
  font-weight: normal;
}

th {
  text-align: left;
  border-bottom: 1px solid;
  border-color: rgba(0, 0, 0, 0.69);
}

th,
td {
  padding: 5px 10px;
}

table > tbody > tr + tr > td {
  border-top: 1px solid;
}

blockquote {
  margin: 0 7px 0 5px;
  padding: 0 16px 0 10px;
  border-left-width: 5px;
  border-left-style: solid;
  break-inside: avoid; /* nie dziel cytatów na strony */
  background-color: #e7f4ff;
  border-left: 5px solid #0079cc;
  padding-bottom: 0.01em; /* dodaj margine na dole bloku quote */
  margin-bottom: 1em;
}


pre:not(.hljs),
pre.hljs code > div {
  padding: 16px;
  border-radius: 3px;
  overflow: auto;
}

h1,
hr,
td {
  border-color: rgba(0, 0, 0, 0.18);
}

h1 {
  string-set: title content();
}

html {
  color: #000;
  font-family: Fira Sans;
  font-size: 11pt;
  font-weight: 400;
  line-height: 1.5;
  margin: 0cm;
  padding: 0;
}

body {
  margin: 0;
  padding: 0;
}

a {
  white-space: normal;
  text-decoration: none;
  word-wrap: break-word;
}

a:hover {
  text-decoration: underline;
  overflow-wrap: anywhere;
}

a:focus,
input:focus,
select:focus,
textarea:focus {
  outline: 1px solid -webkit-focus-ring-color;
  outline-offset: -1px;
}

table {
  line-height: 1;
  /* line-height: 0.6; */
  margin-bottom: 16px;
  break-inside: avoid;
  page-break-inside: avoid;
  border-collapse: collapse;
}

p + table {
  break-before: avoid;
}

table td,
th {
  border: 1px;
  border-style: solid;
  border-color: rgb(209, 209, 209);
  padding-top: 4px;
  padding-bottom: 4px;
}

/* nie rozszerzaj tabeli powyżej 100% */
td:last-child {
  word-break: break-all;
}

/* belka tabeli */
th {
  border-color: rgb(194, 194, 194);
  background-color: #ec652131;
}

tr:nth-child(even) {
  background: rgba(97, 97, 97, 0.082);
}

/* samodzielne bloczki kodu/nie w pre */
code {
  font-family: var(
    --vscode-editor-font-family,
    "SF Mono",
    Monaco,
    Menlo,
    Consolas,
    "Ubuntu Mono",
    "Liberation Mono",
    "DejaVu Sans Mono",
    "Courier New",
    monospace
  );
  font-size: 1em;
  line-height: 1.357em;

  color: #a31515;
  background-color: #ecf0f3;
  padding: 0cm 0.05cm 0cm 0.05cm;
  white-space: nowrap;
}

/* przyklaj opis do kodu */
p + pre {
  break-before: avoid;
}

/* img przyklej do opisu, ale tylko p (nie ul) */
p + img {
  display: block;
  break-inside: avoid;
  page-break-inside: avoid;
  break-before: avoid;
}

div.pagebreak {
  page-break-inside: avoid;
  page-break-after: always;
}

img {
  margin-bottom: 1em;
  max-width: 100%;
  max-height: 100%;
}

pre {
  break-inside: avoid;
  page-break-inside: avoid;
  padding: 4px;
  line-height: 1;
  background-color: rgba(220, 220, 220, 0.4);
  border: 0.01cm solid #bfbfbf;
}

pre:not(.hljs) {
  padding: 4px;
}

pre code {
  /* font-family: Fira Sans; */
  font-family: Source Code Pro, monospace;
  font-size: 9pt;
  break-inside: avoid;
  page-break-inside: avoid;
  line-height: 1.2;
  padding: 0;
  white-space: pre-wrap;
  background-color: transparent;
  color: var(--vscode-editor-foreground);
  tab-size: 4;
}

/* fix font problem. */
.katex .mathnormal {
  font-family: KaTeX_Math;
  font-style: italic;
}

/* fix łamanie wyboldowanych i italicowanych słów w środku */
strong,
em {
  overflow-wrap: normal;
}

b,
i,
mark,
small,
del,
ins,
sub,
sup {
  overflow-wrap: normal;
}

/* pierwiastek ma się dobrze wyświetlać */
.katex img {
  display: block;
  position: absolute;
  width: 100%;
  height: inherit;
}

/* przyklej równanie do poprzedzającego p */
p span.katex-display {
  break-before: avoid;
}

/* https://stackoverflow.com/questions/13366820/how-do-you-make-lettered-lists-using-markdown */
ol ol {
  list-style-type: lower-alpha;
}

/* trzeci poziomiom toc, mniej czarnego */
ul li ul li ul {
  color: rgb(0, 0, 0);
}

@media screen and (max-width: 767px) {
  body {
    margin: 0;
  }

  .container {
    padding-right: 0;
    padding-left: 0;
    max-width: auto;
  }
  .content {
    padding: 20px 15px;
  }
}

kbd {
  background-color: #eee;
  border-radius: 3px;
  border: 1px solid #b4b4b4;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2),
    0 2px 0 0 rgba(255, 255, 255, 0.7) inset;
  color: #333;
  display: inline-block;
  font-size: 0.85em;
  font-weight: 700;
  line-height: 1;
  padding: 2px 4px;
  white-space: nowrap;
}

/* HTML=uncomment below */

@media screen {
  body {
    margin: 10px;
    background: #e6e6e6;
  }

  /* pre code {
    font-weight: bold;
  } */

  p {
    overflow: hidden;
  }
  
  .b-content {
    padding-top: 48px;
  }

  .container {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
    max-width: 790px;
  }

  .content {
    background-color: #fff;
    box-shadow: 3px 3px 6px 0 rgba(65, 72, 75, 0.25);
    border-radius: 8px;
    padding: 50px 70px;
    margin-bottom: 40px;
  }
}

@media screen and (max-width: 767px) {
  body {
    margin: 0;
  }

  .container {
    padding-right: 0;
    padding-left: 0;
    max-width: auto;
  }
  .content {
    padding: 20px 15px;
  }
}

/* Pola quote (ostrzeżenia) nie rozbija na sąsiednie strony */
.markdown-alert {
  break-inside: avoid;
}

/* npm run make_html md/test_sample.md */
/* weasyprint 11_combinations.html 11_combinations.pdf */
/* weasyprint 02_win.html 02_win.pdf */
