#debugger-bar {display: ndone;}

* {padding: 0; margin: 0; box-sizing: border-box;}
html {font-size: 16px;}
body {background: #e7e7e7; font-family: 'Roboto', sans-serif; line-height: 1.45; color: black; font-size: 95%;}
a {color: black;}
img {display: block;}
img.button {cursor: pointer; opacity: 0.9; height: 1.5rem;}
.page {border-left: 0.25rem solid #101010; background: white; margin-inline: auto; min-height: 100svh; position: relative; overflow: hidden; display: flex; flex-direction: column;}
.body {padding: 1.75rem 1rem 6rem 1rem; flex-grow: 1; position: relative;}
h1 {margin-block: 1rem 1.5rem; font-size: 2rem; text-align: center;}
h1 .icon {position: relative; top: 0.1rem; margin-left: 0.4rem; display: inline-block; transform: scale(1.2);}
h2 {margin-block: 2rem 0.75rem; font-size: 1.4rem; font-weight: 700; line-height: 1.2; text-align: center;}

.toprightbutton {position: absolute; top: 0.75rem; right: 1rem; opacity: 0.9;}
p {font-size: 95%;}
@media (max-width: 40rem) {
    .desktop-only, .desktop-only {display: none;}
}
a[onclick]:not([href]) {border-bottom: 1px dotted black; cursor: pointer;}

.qr {text-align: center; margin-block: 0 3rem;}
.qr a {display: block; text-align: center; text-decoration: none; font-weight: bold; font-size: 2rem;}
.qr a img {margin-inline: auto;}

table {font-size: 95%; margin-inline: auto;}
table tr > td {padding-block: 0.25rem;}
table tr > td:last-child {text-align: right;}
table tr > td:not(:last-child) {padding-right: 2rem;}
table tr + tr > td {border-top: 1px solid rgba(0,0,0,0.1);}
table tr[onclick] td, .cartlines li[onclick] {cursor: pointer;}
table tr.hidden {display: none;}


.receiptlink {
    margin-block: -1.5rem 3rem;
    font-size: 1.25rem; 
    font-weight: bold;
    text-align: center;
    display: block;
    text-decoration: none;
}

.roundedbutton {
    background: white; 
    text-decoration: none; 
    padding: 0.75rem 2rem; 
    display: block; 
    text-align: center; 
    border: 2px solid black;
    border-radius: 2rem;
    font-size: 1rem;
    cursor: pointer;
} 
.checkout.roundedbutton {
    filter: invert(1); 
    position: absolute; 
    bottom: 1.75rem; 
    width: calc(100% - 2rem); 
    transition: all 0.3s ease-in-out;
    opacity: 0.9;
    left: 50%;
    transform: translateX(-50%);
    max-width: 30rem;
    z-index: 2;
    font-weight: bold;
    border: 2px solid white;
} 
.roundedbutton.reversed {
    filter: none;
    border: 2px solid black;
    background: transparent;
}

.smallcolumn {max-width: 18rem; width: 100%; margin-inline: auto; margin-bottom: 3rem;}
.email_receipt {margin-block: 2rem;}
.error {font-size: 95%; color: red;}

.previewlink {font-size: 80%; margin-block: 0.35rem;}


/* SWITCH BUTTON */

input.switch {
    width: 0;
    overflow: hidden;
    padding-left: 48px;
    background: #c5c5c5 url() 2px center / auto 23px no-repeat;
    border-radius: 18px;
    border: 0;
    color: transparent;
    height: 27px;
    transition: all 0.25s ease-in-out;
    cursor: pointer;
}
input.switch.active {
    background-color: #101010;
    background-position: calc(100% - 2px) center;
}
input.switch {
    background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgaWQ9InN2ZzgiCiAgIHZlcnNpb249IjEuMSIKICAgdmlld0JveD0iMCAwIDM1LjQyODgwMiAzNS40Mjg4MDIiCiAgIGhlaWdodD0iMzUuNDI4ODAybW0iCiAgIHdpZHRoPSIzNS40Mjg4MDJtbSI+CiAgPGRlZnMKICAgICBpZD0iZGVmczIiIC8+CiAgPG1ldGFkYXRhCiAgICAgaWQ9Im1ldGFkYXRhNSI+CiAgICA8cmRmOlJERj4KICAgICAgPGNjOldvcmsKICAgICAgICAgcmRmOmFib3V0PSIiPgogICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2Uvc3ZnK3htbDwvZGM6Zm9ybWF0PgogICAgICAgIDxkYzp0eXBlCiAgICAgICAgICAgcmRmOnJlc291cmNlPSJodHRwOi8vcHVybC5vcmcvZGMvZGNtaXR5cGUvU3RpbGxJbWFnZSIgLz4KICAgICAgICA8ZGM6dGl0bGU+PC9kYzp0aXRsZT4KICAgICAgPC9jYzpXb3JrPgogICAgPC9yZGY6UkRGPgogIDwvbWV0YWRhdGE+CiAgPGcKICAgICB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtNTQuMTE4MzA5LC0xMDYuNTI5NTUpIgogICAgIGlkPSJsYXllcjEiPgogICAgPGNpcmNsZQogICAgICAgcj0iMTcuNzE0NDAxIgogICAgICAgY3k9IjEyNC4yNDM5NSIKICAgICAgIGN4PSI3MS44MzI3MSIKICAgICAgIGlkPSJwYXRoODIxIgogICAgICAgc3R5bGU9Im9wYWNpdHk6MTtmaWxsOiNmZmZmZmY7ZmlsbC1vcGFjaXR5OjE7c3Ryb2tlOm5vbmU7c3Ryb2tlLXdpZHRoOjQuNzI3MDAwMjQ7c3Ryb2tlLWxpbmVjYXA6c3F1YXJlO3N0cm9rZS1saW5lam9pbjptaXRlcjtzdHJva2UtbWl0ZXJsaW1pdDo0O3N0cm9rZS1kYXNoYXJyYXk6bm9uZTtzdHJva2Utb3BhY2l0eToxIiAvPgogIDwvZz4KPC9zdmc+Cg==');
}

/* FORMS */

form > div {display: flex; flex-direction: column; margin-bottom: 1rem;}
form > div.hidden {display: none;}
form > div > div.number {position: relative; display: flex; flex-direction: column;}
form > div > div.number input {text-align: center;} 
form > div > div.number img {position: absolute; top: 50%; transform: translateY(-50%); cursor: pointer;}
form > div > div.number img:first-child {left: 0.25rem;}
form > div > div.number img:last-child {right: 0.25rem;}
input,select,textarea {
    padding: 0.5rem; 
    border: 1px solid rgba(0,0,0,0.2); 
    font-family: 'Roboto', sans-serif;
    font-size: 95%;
    border-radius: 0;
    background: none;
    background: rgba(0,0,0,0.02);
}
textarea {height: 5rem; resize: vertical;}
input[disabled],textarea[disabled] {
    background: #e5e5e5;
    border: 1px solid #e5e5e5;
    color: rgba(0,0,0,0.5);
}
select.title {
    font-size: 1.25rem;
    margin-inline: auto;
    text-align: center;
    font-weight: bold;
    border: 0;
    display: block;
    margin-top: 1rem;
    background: white;
}
a.button, input[type="submit"] {
    background: black; 
    color: white; 
    margin-top: 0.5rem; 
    padding: 0.5rem 1.5rem; 
    cursor: pointer; 
    font-weight: bold; 
    border-radius: 0;
    display: block;
    text-align: center;
    font-size: 1rem;
    border: 2px solid black;
    height: 2.5rem;
    text-decoration: none;
    opacity: 0.9;
    margin-top: 1rem;
}
a.button.reversed {
    background: transparent;
    color: black;
    border: 2px solid black;
}
label {padding-bottom: 0.5rem;}
label.hashelp {cursor: pointer; text-decoration: underline 1px dotted;}

/* HEADER */

.header {display: flex; padding: 0.75rem 1rem; align-items: center; position: relative;}
.header > * { flex: 1; }
.header .cart, .header .nav {display: flex; align-items: center;}
.header .branding {position: absolute; left: 50%; transform: translateX(-50%); line-height: 1.5;}
.header .branding a {text-decoration: none;}
.header .cart {justify-content: flex-end;}
.header .cart span {
    height: 2rem; 
    width: 2rem; 
    text-align: center; 
    line-height: 2rem; 
    background: white; 
    filter: invert(1); 
    border-radius: 100%;
    transform: translateX(calc(-100% + 0.5rem)) scale(0.75);
    font-weight: bold;
    opacity: 0;
    position: absolute;
    cursor: pointer;
    z-index: 1;
}
.header .cart span::after {
    content: "";
    position: absolute;
    left: 0;
    width: 4.75rem;
    height: 3rem;
    margin-top: -0.5rem;
    background: transparent;
}

/* MENU */

.menu {
    position: absolute;
    left: 0;
    top: 0;
    max-width: 15rem;
    width: 100%;
    background: white;
    height: 100%;
    z-index: 2;   
    transform: translateX(-100%);
    z-index: 3;
    padding-block: 3rem; 
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.body, .menu, .header {transition: transform 0.3s ease-in-out, margin 0.3s ease-in-out}
.menu > img {right: 1rem; position: absolute; top: 0.75rem;}
body.menuopen .menu {transform: translateX(0); box-shadow: 0 0 1rem rgba(0,0,0,0.15);}
.menu ul {border-top: 1px solid rgba(0,0,0,0.1);}
.menu li {list-style: none; border-bottom: 1px solid rgba(0,0,0,0.1);}
.menu li a {display: flex; text-decoration: none; padding: 0.65rem 1rem; align-items: center;}
.menu li.active a {background: black; opacity: 0.9;}
.menu li.active a > * {filter: invert(1);}
.menu li.active a img {opacity: 1;}
.menu li a span {display: block; padding-left: 1rem; line-height: 1.2;}
.menu li a img {opacity: 0.9; height: 1.5rem;}

/* GRID */

.grid {display: flex; grid-gap: 1em; justify-content: center; flex-wrap: wrap;}
.grid.buttons > li {
    border: 1px solid rgba(0,0,0,0.2); 
    list-style: none; 
    display: flex; 
    flex-direction: column; 
    text-align: center; 
    aspect-ratio: 1.8; 
    justify-content: center;
    cursor: pointer;
    width: 8.7em;
}
.grid.buttons.products {gap: 1em 0.75em;}
.grid.buttons.products > li {
    width: 6.85em;
    aspect-ratio: 1.3;
    position: relative;
}
@keyframes addtocart {
    0% {
        top: 0; 
        left: 0;
        border-radius: 0;
        width: 100%;
        height: 100%;
        opacity: 0;
    }
    99% {
        top: var(--dy);
        left: var(--dx);
        border-radius: 100%;
        width: 1.5rem;
        height: 1.5rem;
        opacity: 0.85;
    }
    100% {opacity: 0;}
}
.grid.buttons.products > li.clicked::after {
    content: "";
    width: 100%;
    position: absolute;
    background: transparent;
    border-radius: 0;
    animation-name: addtocart;
    animation-duration: 0.3s;
    animation-fill-mode: forwards;
    background: black;
}
.grid.buttons.paymentlinks > li {
    aspect-ratio: none;
    padding-block: 1.25em 1.5em;
    justify-content: flex-start;
}
.grid.buttons > li:not(.button) > div:nth-child(1) {line-height: 1.1; padding-top: 0.15em;}
.grid.buttons > li.group {background: rgba(0,0,0,0.1); border-color: transparent;}
.grid.buttons > li .meta {opacity: 0.5; font-size: 90%; padding-top: 0.15em;}
.grid.buttons > li.button {
    align-items: center;
    opacity: 0.9;
    line-height: 0;
    border: 0;
    aspect-ratio: unset; 
    width: auto;
    background: white;
    filter: invert(1);
    align-self: center;
    padding: 0.25rem;
    border-radius: 100%;
    margin-block: 1.4em 1.5em;
}
.grid.buttons > li.button img {display: inline-block;}
.grid.buttons.paymentlinks > li .meta {padding-top: 0.4rem;}
.grid.buttons.settings > li .icon img {margin-inline: auto; padding-bottom: 0.2rem;}

.grid.buttons > li.invalid {border: 1px solid red; color: red;}


/* CART */

.cartlines {margin-block: -0.25rem;}
.cartlines li {display: flex; padding-block: 0.45rem;}
.cartlines li + li {border-top: 1px solid rgba(0,0,0,0.1);}
.cartlines li > div:nth-child(1) {min-width: 2rem;}
.cartlines li > div.wide:nth-child(1) {min-width: 5rem;}
.cartlines li > div:nth-child(2) {flex-grow: 1;}


/* SPINNER HACK */

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {-webkit-appearance: none; margin: 0; /* <-- Apparently some margin are still there even though it's hidden */}
input[type=number] {-moz-appearance:textfield; /* Firefox */}


.receipt {
    padding: 2.5rem 2rem; 
    transform: scale(0.9); 
    border-top: 1px dashed rgba(0,0,0,0.1); 
    border-bottom: 1px dashed rgba(0,0,0,0.1); 
    margin-inline: -1rem;
    margin-top: -1rem;
    font-family: monospace;
    box-shadow: 0 0 0.75rem rgba(0,0,0,0.15);
    background: white;
}
.receipt .cartlines li {padding-block: 0.1rem; border: 0!important;}
.receipt .cartlines li.bordertop {border-top: 1px solid rgba(0,0,0,0.5)!important; padding-top: 0.5rem; margin-top: 0.6rem;}
.receipt .cartlines li.borderbottom {border-bottom: 1px solid rgba(0,0,0,0.5)!important; padding-bottom: 0.5rem; margin-bottom: 0.6rem;}

body.pay .header .nav,
body.pay .header .cart,
body.pay .menu {opacity: 0; pointer-events: none;}


h1 .rposlogo img {height: 2.5rem; display: inline-block; vertical-align: middle; position: relative; bottom: 0.15rem;}
h1 .rposlogo {text-align: center; padding: 1rem .15rem 1rem 0;}


@media (min-width: 40rem) {
    .menu li a, .body, .header {padding-inline: 1.5rem;}
    .toprightbutton {right: 1.5rem; top: 1rem;}
    .checkout.button {width: calc(100% - 3rem);}
}

@media (min-width: 47rem) {
    body.menuopen .menu {box-shadow: 0 0 1px rgba(0,0,0,0.4);}
    body .menu > img {display: none;}
    body.menuopen .header, body.menuopen .body {margin-left: 15rem;}
    body.menuopen .checkout.button {width: calc(100% - 18rem);}
}
@media (min-width: 73rem) {
    body:not(.default) .page {margin-block: 2rem; max-width: 70rem; min-height: 40rem;}
    body .menu {box-shadow: 0 0 1px rgba(0,0,0,0.25)!important; transform: translateX(0)!important;}
    body:not(.default) .header, body:not(.default) .body {margin-left: 15rem!important;}
    body .checkout.button {width: calc(100% - 18rem)!important;}
    img.button[src="/img/menu.svg"] {display: none;}
    body .header .branding {
        position: absolute;
        left: 16.5rem;
        transform: translateX(-15rem);
        z-index: 10;
    }
    .body, .menu, .header {transition: none;}
    .header .nav {
        position: absolute;
        margin-left: -15rem;
        z-index: 10;
    }
    body.pay .header {border: 0;}
    body.default .page {border-left: 0.75rem solid #101010;}
}
@media (max-width: 30rem) {
    html {font-size: 17px;}
    h1 {margin-block: 0.5rem 1.5rem;}
    .grid.buttons.products {font-size: clamp(13px, 4.05vw, 17px);}
}
@media (max-width: 23rem) {
    .grid.buttons.products {font-size: clamp(13px, 4vw, 17px);}
}