/**
 * Styles for the shopping cart pop up on the order page
 */

#cart-dialog {
    z-index: 2;
    position: fixed;
    top: 0;
    bottom: 0;
    right: 0;
    box-sizing: border-box;
    min-width: 300px;
    max-width: 500px;
    margin-right: -100vw;
    overflow: auto;

    background: #fff;
    box-shadow: 0 0 5px #888;

    transition: all 0.2s ease-in-out;
}

#cart-dialog.show {
    margin-right: 0;
}

#cart-dialog .cart-dialog-heading {
    background: #1f6db3;
    color: #fff;
    padding: 10px 15px;
}

#cart-dialog .cart-dialog-body {
    padding: 30px;
}

#cart-dialog .close-dialog {
    cursor: pointer;
}

#cart-dialog-heading-msg {
    margin-left: 5px;
    text-transform: uppercase;
    font-weight: bold;
}

#cart-dialog-table {
    margin-bottom: 25px;
}

#cart-dialog-table tr>* {
    text-align: left;
    padding-bottom: 10px;
}

#cart-dialog-table tr> :last-child {
    text-align: right;
    padding-left: 10px;
}

#cart-dialog-table tr>* {
    vertical-align: top;
}

#cart-dialog-table tfoot tr>* {
    font-weight: bold;
    padding-top: 10px;
}

#cart-dialog .no-items-msg {
    margin: 20px 0 40px 0;
}

#cart-dialog .cart-dialog-payment-button,
#cart-dialog .cart-dialog-continue-shopping-button {
    display: block;
    width: 100%;
    border: 2px solid #002248;
    cursor: pointer;

    padding: 10px;
    margin: 10px 0;
}

#cart-dialog .cart-dialog-payment-button {
    color: #fff;
    background: var(--lblue);
    border-color: var(--lblue);
}

#cart-dialog .cart-dialog-continue-shopping-button {
    color: #002248;
    background: #fff;
}


/**
 * Payment form
 */
#prescription-options.error {
    border: 2px solid red;
    padding: 5px;
}

#prescription-options-heading {
    font-weight: bold;
    margin-bottom: 15px;
}

#prescription-options.error #prescription-options-heading {
    color: red;
}

div.prescription-option {
    margin: 10px 0;
    padding: 5px 7px;
}

div.prescription-option .option-details {
    display: none;
}

div.prescription-option .option-label::before {
    font-family: 'Font Awesome 5 Free';
    font-weight: 400;
    content: '\f111';
    margin-right: 10px;
}

div.prescription-option.selected {
    border: 2px solid;
    padding: 5px;
}

div.prescription-option.selected .option-details {
    margin-top: 15px;
    display: block;
}

div.prescription-option.selected .option-label::before {
    font-weight: 900;
    content: '\f058';
}

div.prescription-option:not(.selected) .option-label {
    cursor: pointer;
}

div.prescription-option:not(.selected) .option-label:hover span {
    text-decoration: underline;
}

div.prescription-option:not(.selected) .option-label:hover::before {
    font-weight: 900;
    content: '\f058';
}


@media screen and (max-width: 1000px) {

    table,
    thead,
    tbody,
    th,
    td,
    tr {
        display: block;
    }

    thead tr {
        display: none;
    }

    tr {
        margin-bottom: 10px;
    }

    .cart-table th,
    .cart-table td {
        border: 0;
    }

    .cart-table td,
    .cart-table tbody th {
        position: relative;
        display: flex;
        justify-content: space-between;
        gap: 1.5rem;
        text-align: right;
    }

    .cart-table td::before,
    .cart-table tbody th::before {
        content: attr(data-label);
        font-weight: bold;
    }

    .cart-table th,
    .cart-table tr> :first-child,
    .cart-table td.action-col {
        padding: 5px 10px;
    }

    .cart-table .drug-btn.add-to-cart-button {
        width: 100%;
    }

    .cart-table .order-product {
        width: auto;
    }

    .proceed-payment,
    .continue-shopping {
        max-width: unset;
    }

    .checkout-table .flex-2-3,
    .checkout-table .flex-1-3,
    .form-single .flex-1-3 {
        flex-basis: 100%;
    }
}