.threadbit .thread { 
    -webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */
    -moz-box-sizing: border-box;    /* Firefox, other Gecko */
    box-sizing: border-box;         /* Opera/IE 8+ */
}

@media screen and (orientation: landscape) {
    #big-window {
        width: 80%;
        display: grid;
        grid-template-areas: "label label" "header header" "products cart";
    }

    #cart {
        display: none;
        grid-area: cart;
        margin-left: 30vw;
        margin-right: -10vw;
    }

    #payment-element {
        overflow-y: auto; 
        overflow-x: hidden; 
        margin-right: -10px; 
        padding-right: 10px; 
        height: 40vh;
    }

    #checkout-modal {
        position: fixed;
        z-index: 2;
        padding: 10px;
        height: 60vh;
        width: 50vw;
        left: 50%;
        top: 55%;
        transform: translate(-50%, -50%);
    }
}

@media screen and (orientation: portrait) {
    body {
        display: flex;
        flex-direction: column;
    }

    #cart {
        display: none;
        margin-left: 30vw;
        margin-top: -10vw;
    }

    #payment-element {
        overflow-y: auto; 
        overflow-x: hidden; 
        margin-right: -10px; 
        padding-right: 10px; 
    }

    #checkout-modal {
        position: fixed;
        z-index: 2;
        padding: 10px;
        width: 60vw;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
    }
}

body {
    background-color: darkcyan;
}

textarea {
    resize: none;
    width: 100%;
}

#big-label {
    grid-area: label;
}

#header-logo {
    grid-area: header;
}

.window {
    border: black;
    border-width: 3px;
    border-style: outset;
    padding: 10px;
    background-color: rgb(173, 173, 173);
}

.window-label {
    margin: -10px;
    margin-bottom: 10px;
    padding-left: 10px;
    background: #277cde;
}

#products {
    grid-area: products;
}

.quantity-button {
    cursor: pointer;
}

.cart-item {
    display: grid;
    grid-template-columns: 50% 50%;
    grid-template-areas: "product product" "price quantity";
    width: 50%;
}

.cart-product {
    grid-area: product;
}

.cart-price {
    grid-area: price;
}

.cart-quantity {
    grid-area: quantity;
}

#checkout-button {
    cursor: pointer;
    margin-top: 10px;
}

#modal-background {
    display: none;
    position: absolute;
    height: 100%;
    width: 100%;
    z-index: 1;
    top: 0;
    left: 0;
}

#modal-close {
    position: absolute;
    top: 0;
    right: 0;
    margin: 5px;
    margin-top: -5px;
    font-size: 30px;
    background: none;
    border: none;
    cursor: pointer;
}