/* ******** SHOPPING CART ********* */
#cart_header {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: repeat(1fr);
    grid-row-gap: 10px;
    place-items: center;
}
#cart_header_details {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items:center
}
#sign_in_or_register_wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
}
#free_shipping_difference_message {
    text-align: center;
}
#cart_item_count {
    padding:0 0.5rem 0 0.25rem;
}
#single_shipment_rates_wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
/* Fomantic overrides for table */
#single_shipment_rates td {
    padding-top: 1px;
    padding-bottom: 0;
    border: none;
}
#single_shipment_rates th {
    border: none;
    padding: 0;
    padding-top: 2px;
}
#single_shipment_rates .label {
    padding: 3px 4px !important;
}
#single_shipment_rates label, #single_shipment_rates input {
    cursor: pointer;
}
/* Attempt to do leading dots that didn't work */
/* #single_shipment_rates label span:first-of-type::after {
    background-image: radial-gradient(circle, currentcolor 1px, transparent 1.5px);
    background-position: bottom;
    background-size: 1ex 2px;
    background-repeat: space no-repeat;
    content: "";
    flex-grow: 1;
    order: 2;
    height: 1rem;
} */

/* The original in Fomantic UI is calc(50% - 2em), but for some reason the (address) cards were stacking too soon */
#address_div .ui.two.stackable.cards .card {
    width: calc(50% - 3em);
}
#address_div .ui.cards {
    max-height: 375px;
    overflow-y: auto;
}
/* ******* MEDIA QUERY GROUPING ******* */
/* Oddly, Semantic sets a top margin of zero on the card at 767px or below, so have to counteract that - doing it with padding on the wrapper */
@media screen and (max-width: 767px) {
    #address_div .ui.cards { padding-top: 0.75rem !important; }
}
@media screen and (max-width: 900px) {
    #address_div .ui.cards {
        max-height: 250px;
    }
}
@media screen and (max-width: 414px) {
    #address_div .ui.cards {
        max-height: 215px;
    }
}

@media screen and (max-width:400px) {
    #shopping_cart .remove.link {
        margin-top: 1rem;
    }
    #sign_in_or_register_wrapper {
        flex-direction:column;
    }
    .addressEdit.button {
        margin-top: 0.2rem;
    }
    #discount_code {
        max-width: 195px
    }
    #id_cc_num {
        max-width: 230px
    }
}
@media screen and (max-width:360px) {
    .addresses.grid h3 {
        font-size: 1rem;
    }
    #discount_code {
        max-width: 140px;
    }
    #id_cc_num {
        max-width: 175px;
    }
}
@media screen and (max-width:767px) {
    .col-config { display: none }
    .config-visible-small-screen { display: block }
    .col-unit-price { display: none }
    .unit-price-in-quantity-col { display: block }
    #btn_checkout {
        display: block;
        margin-top: 0.5rem;
    }
    #cart_header {
        flex-direction: column;
        justify-content: space-between;
    }
    #cart_header h2, #cart_header h3 {
        margin-top: initial;
        margin-bottom: initial;
    }
}
@media screen and (min-width:768px) {
    .col-config { display: table-cell }
    .config-visible-small-screen { display: none }
    .col-unit-price { display: table-cell }
    .unit-price-in-quantity-col { display: none }
    #btn_checkout {
        display: none;
        margin-left: 0.5rem;
    }
    #cart_header {
        flex-direction: row;
    }
    #cart_header h2, #cart_header h3 {
        margin-top: 0;
        margin-bottom: 0;
    }
}

@media screen and (min-width: 450px) and (max-width: 767px) {
    #single_shipment_rates td:nth-child(-n+2) {
        border-bottom: 1px solid lightgray;
    }
}

.oi-quantity-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
}
.oi-quantity-wrapper .remove.link.icon {
    margin: 1px 0 0 3px;
}
@media screen and (max-width: 1200px) {
    .oi-quantity-wrapper {
        flex-direction: column;
    }
    .oi-quantity-wrapper .remove.link.icon {
        margin: 1px 0 0 0;
    }
}

.oi-quantity {
    min-width: 45px;
    max-width: 70px;
    text-align: center;
}
.oi-quantity ~ .remove.link {
    display: unset;
}
@media screen and (max-width: 1200px) {
    .oi-quantity {
        margin-bottom: 5px;
    }
}

.address.card:not(.blue):not(.red) .content:first-of-type {
    padding-top: 6px;
    padding-bottom: 6px;
    display: flex;
    justify-content: center;
    align-items: center;
}
.address.card .content:nth-of-type(2) {
    padding-top: 7px;
    padding-bottom: 7px;
}
textarea[name="notes_holder"] {
    min-height: unset !important;
    height:  100% !important;
}
@media screen and (max-width: 400px) {
    textarea[name="notes_holder"] {
        min-height: unset !important;
        max-height:  5rem !important;
    }
}