:root {
    --cream: #f8f3ea;
    --blue: #2457e6;
    --orange: #f4a261;
    --navy: #17213a;
    --muted: #687188;
    --pale: #e7edff;
    --line: #e9e5dd;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
    margin: 0;
    background: var(--cream);
    color: var(--navy);
}

body {
    font-family: Arial, sans-serif;
}

button,
input {
    font: inherit;
}

/*
 * Volledige appomgeving
 */

.app-shell {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 100svh;
    padding: 30px 20px;
    overflow: hidden;
    background:
        radial-gradient(
            circle at 50% 30%,
            #fff,
            #fbf7f0 48%,
            #f6ecdd
        );
}

/*
 * Achtergronddecoratie
 */

.decor {
    position: absolute;
    width: 250px;
    height: 190px;
    border: 3px solid #f4a26118;
    border-radius: 32px;
}

.decor.left {
    left: -100px;
    bottom: 8%;
    transform: rotate(-18deg);
}

.decor.right {
    right: -100px;
    top: 12%;
    transform: rotate(12deg);
}

/*
 * Hoofdcontainer
 */

.phone-card {
    position: relative;
    display: flex;
    flex-direction: column;
    width: min(100%, 430px);
    height: min(820px, calc(100svh - 40px));
    min-height: 650px;
    overflow: hidden;
    background: #fffffff7;
    border-radius: 32px;
    box-shadow: 0 22px 65px #49311124;
}

/*
 * Bovenbalk
 */

.topbar {
    display: grid;
    grid-template-columns: 42px 1fr auto;
    align-items: center;
    flex-shrink: 0;
    gap: 10px;
    padding: 18px 20px 16px;
    border-bottom:10px solid var(--cream);
}

.back {
    height: 38px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    touch-action: manipulation;
}

.topbar i {
    color: var(--blue);
    font-style: normal;
}

.price-chip {
    width: max-content;
    justify-self: end;
    padding: 8px 11px;
    background: var(--pale);
    color: var(--blue);
    border-radius: 12px;
    font-size: 13px;
    font-weight: 800;
}

.hidden {
    display: none !important;
}

/*
 * Schermen
 */

.screen {
    position: relative;
    display: none;
    flex: 1;
    min-width: 0;
    min-height: 0;
    padding: 32px 28px 22px;
    animation: enter 0.22s ease;
}

.screen.active {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
}

/*
 * Extra ruimte onderaan het scrollbare scherm
 */

.screen.active::after {
    content: "";
    display: block;
    flex: 0 0 12px;
}

/*
 * Algemene typografie
 */

h2 {
    margin: 0 0 12px;
    font-size: 31px;
    line-height: 1.05;
    letter-spacing: -0.035em;
}

.lead,
.sub {
    color: var(--muted);
    line-height: 1.55;
}

.lead {
    margin: 0 auto 25px;
    font-size: 17px;
}

.sub {
    margin: 0 0 25px;
    font-size: 14px;
}

/*
 * Algemene knoppen
 */

.primary,
.secondary {
    width: 100%;
    min-height: 58px;
    padding: 15px 20px;
    border: 0;
    border-radius: 18px;
    font-weight: 800;
    cursor: pointer;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.primary {
    background:
        linear-gradient(
            135deg,
            #2862ef,
            var(--blue)
        );
    color: #fff;
    box-shadow: 0 10px 22px #2457e640;
}

.primary:disabled {
    background: #c6ccda;
    box-shadow: none;
    cursor: not-allowed;
}

.secondary {
    background: var(--pale);
    color: var(--blue);
}

.screen-action {
    margin-top: auto;
    padding-top: 22px;
}

/*
 * Aantal labels
 */

.counter {
    display: grid;
    grid-template-columns: 58px 1fr 58px;
    align-items: center;
    margin: 15px 0;
    padding: 12px;
    background: #fbfaf7;
    border: 1px solid var(--line);
    border-radius: 22px;
}

.counter button {
    height: 50px;
    border: 0;
    border-radius: 15px;
    background: #fff;
    color: var(--blue);
    font-size: 28px;
    cursor: pointer;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.counter div {
    text-align: center;
}

.counter strong {
    display: block;
    font-size: 38px;
}

.counter span {
    color: var(--muted);
    font-size: 12px;
}

/*
 * Snelle aantalkeuze
 */

.quick-counts {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-bottom: 20px;
}

.quick-counts button {
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.quick-counts button.active {
    border-color: var(--blue);
    background: var(--pale);
    color: var(--blue);
}

/*
 * Naamveld
 */

.name-field {
    display: grid;
    gap: 8px;
    margin: 0;
}

.name-field > span {
    color: var(--navy);
    font-size: 16px;
    font-weight: 700;
}

.name-field input {
    width: 100%;
    height: 52px;
    padding: 0 15px;
    border: 1px solid var(--line);
    border-radius: 14px;
    outline: none;
    background: #fff;
    color: var(--navy);
}

.name-field input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 4px #2457e61a;
}

.name-field input::placeholder {
    color: #a6abba;
}

.name-error {
    min-height: 15px;
    color: #b42318;
    font-size: 11px;
}

/*
 * Prijsoverzicht
 */

.summary {
    display: flex;
    justify-content: space-between;
    padding: 16px;
    background: #fbfaf7;
    border-radius: 15px;
}

.summary span {
    color: var(--muted);
}

/*
 * Betaalkeuzes
 */

.choices {
    display: grid;
    gap: 13px;
    margin: 20px 0;
}

.choices button {
    display: grid;
    grid-template-columns: 50px 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: 19px;
    background: #fff;
    text-align: left;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.choices button:disabled {
    opacity: 0.55;
    cursor: wait;
}

.choices small,
.choices strong {
    display: block;
}

.choices small {
    margin-top: 4px;
    color: var(--muted);
}

.choices i {
    font-size: 27px;
}

.choice-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 14px;
}

.choice-icon.blue {
    background: #e7edff;
    color: var(--blue);
}

.choice-icon.orange {
    background: #e5f5e9;
    color: #e78327;
}

/*
 * Betaalmeldingen
 */

.notice {
    display: none;
    margin: 0;
    padding: 12px 14px;
    background: #fff4df;
    color: #8a551d;
    border-radius: 14px;
    font-size: 12px;
    line-height: 1.45;
}

.notice:not(:empty) {
    display: block;
}

.error {
    color: #b42318;
    font-size: 12px;
    text-align: center;
}

/*
 * Uploadscherm
 */

.upload {
    padding-top: 27px;
}

#upload-list {
    display: grid;
    gap: 9px;
    max-height: 345px;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
}

.upload-item {
    display: grid;
    grid-template-columns: 43px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #fbfcff;
    border: 1px dashed #b9c3d8;
    border-radius: 17px;
    cursor: pointer;
}

.upload-item input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.upload-item > b {
    display: grid;
    place-items: center;
    width: 43px;
    height: 43px;
    background: var(--pale);
    color: var(--blue);
    border-radius: 13px;
}

.upload-item strong,
.upload-item small {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.upload-item small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
}

.upload-item i {
    color: var(--blue);
}

.upload-item.complete {
    background: #f6fcf8;
    border-style: solid;
    border-color: #bfe6cf;
}

.upload-item.complete > b {
    background: #dff5e7;
    color: #16854a;
}

.upload-status {
    color: var(--muted);
    font-size: 12px;
    text-align: center;
}

/*
 * Voortgangsbalk
 */

.steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    flex-shrink: 0;
    padding: 12px 16px 10px 12px;
    background: #fff;
    border-top:1px solid var(--cream);
}

.steps div {
    color: #afb5c0;
    text-align: center;
}

.steps b {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    margin: auto;
    background: #eff1f6;
    border-radius: 50%;
}

.steps small {
    display: block;
    margin-top: 5px;
    font-size: 10px;
}

.steps .current {
    color: var(--blue);
}

.steps .current b {
    background: var(--blue);
    color: #fff;
}

/*
 * Verzend- en bevestigingsschermen
 */

.center {
    align-items: center;
    justify-content: center;
    text-align: center !important;
}

.printing-icon,
.success {
    display: grid;
    place-items: center;
    width: 90px;
    height: 90px;
    margin: 0 auto 25px;
    background: var(--pale);
    color: var(--blue);
    border-radius: 26px;
    font-size: 38px;
}

.success {
    background: #dff5e7;
    color: #16854a;
    border-radius: 50%;
}

.receipt {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 24px;
    padding: 17px;
    background: #fbfaf7;
    border-radius: 15px;
    font-size: 12px;
    text-align: left;
}

.receipt strong {
    text-align: right;
}

/*
 * Animaties
 */

@keyframes enter {
    from {
        opacity: 0;
        transform: translateY(9px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

/*
 * Mobiele weergave
 */

@media (max-width: 520px) {
    .app-shell {
        padding: 0;
        background: #fff;
    }

    .decor {
        display: none;
    }

    .phone-card {
        width: 100%;
        height: 100svh;
        min-height: 0;
        max-height: 100svh;
        border-radius: 0;
        box-shadow: none;
    }

    .screen {
        padding-right: 24px;
        padding-left: 24px;
    }
}

/*
 * Lage schermen
 */

@media (max-height: 720px) {
    .screen {
        padding-top: 24px;
    }

    .counter {
        margin: 8px 0;
    }

    .quick-counts {
        margin-bottom: 10px;
    }
}

/*
 * Verminderde beweging
 */

@media (prefers-reduced-motion: reduce) {
    .screen {
        animation: none;
    }
}