:root {
    --receipt-jagged-color: white;
    --receipt-color: transparent;
    --bottom-kvitto-color: hsla(0, 0%, 0%, 0.0);
    --background-color: white;
}

@media (prefers-color-scheme: dark) {
    :root {
        --background-color: rgb(33, 33, 33);
        --receipt-jagged-color: rgb(100, 100, 100);
        --receipt-color: transparent;
    }

    div#calculated-total {
        background-color: #bbb;
    }
}

html {
    height: 100%;
}

html, body {
    margin: 0;
    padding: 0;
}

body.contributors {
    grid-template-columns: 1fr min(45rem,100%) 1fr;
    grid-template-rows: 1fr auto;
    height: 100%;
}

.content {
    display: grid;
    grid-template-rows: auto auto auto;
    grid-auto-flow: column;

    overflow: auto;

    background:
            linear-gradient(rgba(255, 255, 255, 0), var(--background-color) 70%) center bottom / 100% 40px no-repeat local,
            radial-gradient(farthest-side at 50% 100%, rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.03)) center bottom / 100% 14px no-repeat scroll,
            var(--receipt-jagged-color);

}

.share-text {
    padding-top: 8px;
    display: block;
    font-family: var(--mono-font);
    font-style: italic;
    text-align: center;
}

.qr {
    width: 100%;
    padding: 10% 10% 20px;
    position: relative;
}

.qr img {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 0;
}

#page-load-anchor {
    position: absolute;
    bottom: 25%;
}

.drag-handle {
    display: block;
    width: 40px;
    height: 4px;
    background: #ccc;
    border-radius: 2px;
    margin: 12px auto;
}

.receipt {
    position: relative;
    background-color: var(--receipt-color);
    box-shadow: 0 10px 15px -10px rgba(0, 0, 0, 0.4);
    border-top: 1px dashed #bbb;
    margin-bottom: 15px;
}

.receipt::before {
    content: "";
    position: absolute;
    height: 8px;
    left: 0;
    right: 0;
    bottom: -8px;

    background-size: 8px 8px;
    background-repeat: repeat-x;
    background-position: 4px 0;

    background-image: repeating-linear-gradient(
            45deg,
            transparent 0%,
            transparent 75%,
            var(--bottom-kvitto-color) 75%,
            var(--bottom-kvitto-color) 100%
    ), repeating-linear-gradient(
            -45deg,
            transparent 0%,
            transparent 75%,
            var(--bottom-kvitto-color) 75%,
            var(--bottom-kvitto-color) 100%
    ), repeating-linear-gradient(
            45deg,
            transparent 0%,
            transparent 75%,
            var(--receipt-jagged-color) 75%,
            var(--receipt-jagged-color) 100%
    ), repeating-linear-gradient(
            -45deg,
            transparent 0%,
            transparent 75%,
            var(--receipt-jagged-color) 75%,
            var(--receipt-jagged-color) 100%
    );
}

@media (prefers-color-scheme: dark) {
    .qr img {
        filter: invert(1);
    }
}

.dash-line {
    display: block;
    color: black;
    text-align: center;
    overflow: hidden;
    position: relative;
}

.dash-line pre {
    display: inline-block;
    padding: 0;
    margin: 0 auto;
    border: none;
    background: none;
    max-width: unset;
    text-align: left;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
}

.kvitto-items div {
    padding: 10px;
    border-width: 1px 0;
    border-style: dashed;
    border-color: #bbb;
    font-family: var(--mono-font);
}

.kvitto-items div:last-child {
    border-bottom: none;
}

.kvitto-items div span:last-child {
    float: right;
}

#tray {
    display: flex;
    flex-direction: row;
}

#calculated-total {
    flex-grow: 1;
    align-content: center;
    padding-left: 8px;
    background-color: rgba(29, 175, 236, 0.01);
    color: #04102c;
    font-weight: bold;
    padding-top: 6px;
}

a.pay-with-swish {
    white-space: nowrap;
    align-items: center;
    background: linear-gradient(180deg, #1dafec, #129bd4);
    color: #fff;
    display: flex;
    font-weight: 700;
    min-height: 48px;
    text-decoration: none;
    padding-left: 24px;
    padding-right: 24px;
}

a.pay-with-swish:visited {
    color: #fff;
}

label {
    display: block;
}
