
/* Global variables. */
:root {
  /* Set sans-serif & mono fonts */
  --sans-font: -apple-system, BlinkMacSystemFont, "Avenir Next", Avenir,
"Nimbus Sans L", Roboto, "Noto Sans", "Segoe UI", Arial, Helvetica,
    "Helvetica Neue", sans-serif;
  --mono-font: Consolas, Menlo, Monaco, "Andale Mono", "Ubuntu Mono", monospace;
  --standard-border-radius: 5px;
  --border-width: 1px;

  /* Default (light) theme */
  --bg: #fff;
  --accent-bg: #f5f7ff;
  --text: #212121;
  --text-light: #585858;
  --border: #898EA4;
  --taskers-yellow: #FFC52D;
  --taskers-blue: #034EA2;
  --accent: var(--taskers-blue);
  --accent-hover: #1266e2;
  --accent-text: var(--bg);
  --code: #d81b60;
  --preformatted: #444;
  --marked: #ffdd33;
  --disabled: #efefef;

  --header-height: 50px;
  --page-side-width: 16.6%;
  --margin-gap: 1rem;
}

/* Reset box-sizing */
*, *::before, *::after {
  box-sizing: border-box;
}

/* Reset default appearance */
textarea,
select,
input,
progress {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

html {
  /* Set the font globally */
  font-family: var(--sans-font);
  scroll-behavior: smooth;
}
body {
  margin: 0;
}

header {
  background-color: white;
  position: fixed;
  z-index: 1;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  border-bottom: 1px solid var(--border)
}
header img.logo {
  float: left;
  margin: 5px;
  margin-left: 10px;
  height: calc(var(--header-height) - 2 * 5px);
}
header img.title-ivan {
  float: left;
  height: 80px;
  position: relative;
  top: -15px;
  left: -10px;
}

header .navbar-right {
  float: right;
  line-height: var(--header-height);
  margin: 0 20px;
}

main {
  position: relative;
  left: var(--page-side-width);
  width: calc(100% - var(--page-side-width));
  top: var(--header-height);
}
.main-content {
  margin: var(--margin-gap);
  max-width: 1600px;
}


nav, table {
  margin-bottom: var(--margin-gap);
}

aside.page-side {
  border-right: 1px solid rgba(0, 0, 0, 0.15);
  position: fixed;
  left: 0;
  top: 0;
  float: left;
  margin-top: var(--header-height);
  width: var(--page-side-width);
  height: 100%;
  background-color: var(--accent-bg);
}
aside.page-side nav a {
  width: 100%;
  display: block;
  padding: 0.2rem 0.5rem;
  color: black;
  text-decoration: none;
  font-weight: 700;
  border-bottom: 1px solid rgba(0, 0, 0, 0.15);
}
aside.page-side nav a:hover {
  background-color: var(--accent-hover);
  color: white;
}

form {
  font-size: 120%;
}

input[type=search] {
  font-size: 120%;
  width: 20rem;
  padding: 0.5rem;
  margin: 0.5rem;
  box-sizing: border-box;
  border: 1px solid rgba(0, 0, 0, 0.45);
  border-radius: 0.5rem;
}

input[type=text] {
  font-size: 100%;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 0.3rem;
}

input#quantity {
  width: 3rem;
  text-align: right;
}


.button, button, input[type="number"]{
  display: inline-block;
  text-decoration: none;
  line-height: normal;
  font-size: 1rem;
  font-family: inherit;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 0.3rem;
  background-color: var(--taskers-blue);
  color: white;
  margin-right: 5px;
  margin-bottom: var(--margin-gap);
}

small {
  font-size: 60%;
}
td,th {
    white-space: nowrap;
    overflow: hidden;
    border: 1px solid var(--border);
    padding: 2px 10px;
}

.tr_clickable:hover {
    background: #ffffe0;
}

.pagy a,.pagy a:visited {
    padding: 5px 20px;
    line-height: 2.3;
    background: var(--accent-bg);
    border-radius: 5px;
    color: var(--text);
    text-decoration: none;
    margin: 2px;
    border: var(--border-width) solid var(--border)
}

[aria-current]:not([aria-current=false]) {
    font-weight: bold
}

.alert {
  color: orange;
}

table {
  border-collapse: collapse;
  table-layout: fixed;
  width: 100%;
  max-width: 900px;
}

tr:nth-child(even) {
  /* Set every other cell slightly darker. Improves readability. */
  background-color: var(--accent-bg);
}


table.part-info>tbody>tr:nth-child(1)>td:nth-child(1),
table.part-info>tbody>tr:nth-child(1)>td:nth-child(4) {
    width: 10rem;
}

table.part-info>tbody>tr>td:nth-child(2)::after {
    content: " ";
    background: #ffffe0
}

table.part-info>tbody>tr>td:nth-child(3) {
    background: #ffffe0;
    width: 1.5rem;
    background-color: var(--bg);
    border-top: none;
    border-bottom: none
}

table.stock-enquiry>tbody>tr>* { width: 6rem; }
table.stock-enquiry>tbody>tr>*:nth-child(1) { width: 9rem; }
table.stock-enquiry>tbody>tr>*:nth-child(2) { width: 25rem; }

table.stock-enquiry>tbody>tr>*:nth-child(3),
table.stock-enquiry>tbody>tr>*:nth-child(5),
table.stock-enquiry>tbody>tr>*:nth-child(6),
table.stock-enquiry>tbody>tr>*:nth-child(7),
table.stock-enquiry>tbody>tr>*:nth-child(8)
{
  text-align: right;
}

th {
  text-align: left;
}
table.stock-enquiry>tbody>tr>td:nth-child(4),
table.stock-enquiry>tbody>tr>th:nth-child(4) {
  text-align: center;
}

table.suppliers {
  width: 15rem;
}
input#supplier_filter {
  text-transform: uppercase;
}
table.orders>tbody>tr>* { 
  min-width: 6rem;
  width: 6rem; 
}
table.orders>tbody>tr>*:nth-child(4) { 
  min-width: 32rem;
  width: 32rem; 
}
table.order-details {
  width: 32rem;
}
table.order-details>tbody>tr>*:nth-child(1) {
  font-weight: bold;
  width: 7rem;
}

table.order-lines>tbody>tr>* {
  width: 3rem;
  min-width: 3rem;
}
table.order-lines>tbody>tr>*:nth-child(1) {
  width: 6rem;
  min-width: 6rem;
}
table.order-lines>tbody>tr>*:nth-child(2) {
  width: 15rem;
  min-width: 15rem;
}
table.order-lines>tbody>tr>*:nth-child(3) { text-align: center; }
table.order-lines>tbody>tr>*:nth-child(4) { text-align: center; }
table.order-lines>tbody>tr>*:nth-child(5) { text-align: right; }
table.order-lines>tbody>tr>*:nth-child(6) { text-align: right; }

.inline-block {
  display: inline-block;
}
