/* DM Sans font loaded via <link> in HTML for better performance */

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    touch-action: manipulation;
}

html {
    -webkit-font-smoothing: antialiased;
    -webkit-text-size-adjust: none;
    text-size-adjust: none;
    hanging-punctuation: first allow-end last;
    font-size: 1.25rem;
    font-weight: 400;
    overscroll-behavior-y: none;
    font-family: 'DM Sans', sans-serif;
    background-color: white;
    color: black;
}

body {
    display: flex;
    flex-direction: column;
    align-items: center;
}

main,
header {
    display: flex;
    max-width: 30rem;
    width: 100%;
    padding-left: .5rem;
    padding-right: .5rem;
}

header {
    justify-content: center;
    align-items: center;
    height: 6rem;
}

.logo {
    height: 4rem;
}

main {
    display: flex;
    flex-direction: column;
    min-height: calc(100dvh - 6rem);
    padding-bottom: .5rem;
}

.vh-spacer {
    flex: 1;
    min-height: 1.5rem;
}

h1 {
    font-size: 1.5rem;
    font-weight: 700;
}

#warning-message {
    color: red;
    font-size: 1rem;
    margin-top: 0.5rem;
    display: none;
}

.line-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

.line-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price-and-quantity {
    display: flex;
    align-items: space-between;
    gap: .5rem;
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.quantity-btn {
    width: 1.5rem;
    height: 1.5rem;
    border: 1px solid black;
    border-radius: 0.5rem;
    background-color: white;
    color: black;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
    user-select: none;
    padding: 0;
    font-family: 'DM Sans', sans-serif;
}

.quantity-btn:hover {
    background-color: #f0f0f0;
}

.quantity-btn:active {
    background-color: #e0e0e0;
}

.quantity-display {
    text-align: center;
    font-size: 1rem;
    width: 1rem;
    font-weight: 500;
}

.boring-stuff {
    display: flex;
    flex-direction: column;
    width: 100%;
    font-size: .75rem;
    color: gray;
    font-style: italic;
}

.marketing-opt-out {
    vertical-align: middle;
}

.marketing-opt-out input[type="checkbox"] {
    vertical-align: middle;
}

.express-checkout-container {
    margin-top: .5rem;
}

.total {
    font-weight: 700;
    margin-top: 1.5rem;
}

.success-message {
    font-size: 1rem;
    margin-top: 1.5rem;
}

.back-link {
    margin-top: 1.5rem;
}

.terms-and-conditions-item {
    margin-bottom: 1rem;
}
