html {
    --white: #f0f0f0;
    --yellow: #ddfb8d;
    --black: #000;
    --grey: #444;
    --success: lime;
    --warning: orange;
    --error: red;
}

.success {
    color: var(--success);
}

.warning {
    color: var(--warning);
}

.error {
    color: var(--error);
    opacity: 1 !important;
}

* {
    box-sizing: border-box;
}

body {
    background: var(--black);
    padding: 0;
    margin: 0;
    min-height: 100vh;
    font-family: Tahoma, sans-serif;
    font-size: 16px;
    color: var(--white);
    text-align: center;
}

main {
    max-width: 600px;
    padding: 2rem;
    margin: auto;
}

.contained {
    max-width: 600px;
    margin: auto;
}

body.full-width main {
    max-width: 100%;
}

.full-width:not(body) {
    width: 100%;
}

footer {
    max-width: 600px;
    padding: 0 2rem 2rem;
    margin: auto;
}

ul {
    list-style-type: none;
    padding: 0;
}

ul li {
    margin: 1rem 0;
}

label {
    text-align: left;
}

:is(h1, h2, h3, h4, h5, h6) {
    color: var(--yellow);
}

:is(button, a.button) {
    cursor: pointer;
    transition: all 0.3s ease;
    display: block;
    width: 100%;
    font-size: 1.1rem;
    padding: 0.6rem 1.1rem;
    border-radius: 0.5rem;
    border: 2px solid var(--yellow);
    background: transparent;
    color: var(--white);
    text-decoration: none;
    text-align: center;
}

:is(button, a.button):hover, :is(button, a.button).active {
    background-color: var(--yellow);
    color: var(--black);
}

a {
    color: var(--yellow);
}

input {
    width: 100%;
    font-size: 1.1rem;
    padding: 0.6rem 1.1rem;
    border-radius: 0.5rem;
    border: 2px solid var(--yellow);
    background: transparent;
    color: var(--white);
}

form {
    text-align: left;
}

.input-wrapper {
    display: flex;
    flex-flow: column;
    gap: 0.5rem;
    margin: 1rem 0;
}

.input-wrapper:has(button[type="submit"]) {
    margin-top: 2rem;
}

footer .button.back {
    margin-bottom: 1rem;
}

body.no-back-btn footer .button.back {
    display: none;
}

pre {
    text-align: left;
}

.product-name-wrapper {
    display: flex;
    flex-flow: column;
    gap: 0.5rem;
}

.select2-selection {
    width: 100% !important;
    font-size: 1.1rem !important;
    padding: 0.6rem 1.1rem !important;
    border-radius: 0.5rem !important;
    border: 2px solid var(--yellow) !important;
    background: transparent !important;
    height: auto !important;
    min-height: calc(26px + 1.2rem);
}

.select2-selection .select2-selection__rendered {
    font: inherit !important;
    color: var(--white) !important;
    line-height: inherit !important;
    padding-left: 0 !important;
}

.select2-selection .select2-selection__arrow {
    height: 100% !important;
}

.select2-selection .select2-selection__arrow b {
    border-color: var(--white) transparent transparent transparent !important;
}

.select2-dropdown {
    background: var(--black);
    margin-top: 0.2rem;
    border-radius: 0.5rem !important;
    border: 2px solid var(--yellow) !important;
}

.select2-dropdown .select2-results__options {
    border-radius: 0.5rem !important;
}

.select2-dropdown .select2-results li {
    background: var(--black);
    margin: 0;
}

.select2-dropdown .select2-results li.select2-results__option--highlighted {
    background: var(--grey);
}

.select2-dropdown .select2-results li:has(.expired),
.select2-selection:has(.expired) {
    background: var(--error) !important;
}

table {
    border-collapse: collapse;
    text-align: left;
}

table tr {
    border-color: var(--grey);
    border-width: 1px;
    border-style: solid none;
}

table tr.expired {
    background: var(--error);
}

table :is(td, th) {
    padding: 0.5rem;
}

/* dialog */
dialog {
    background: var(--black);
    border: 1px solid var(--grey);
    color: var(--white);

    &::backdrop {
        background: rgb(0, 0, 0, 0.4);
    }

    li {
        margin: 0.5rem 0;
    }
}

/* baza produktow */
tr.inactive {
    font-style: italic;
    opacity: 0.8;
}