/* Modal
================================================== */
.modal {
    background-color: white;
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh; /* Fallback */
    height: 100dvh;
    width: 100%;
    z-index: 1010;

    display: flex;
    flex-direction: column;
}

.modal__container {
    width: 100%;
    height: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    border-radius: 8px;
}

.modal__header {
    position: sticky;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1.5rem;
    border-top: 1px solid var(--grey-200);
    border-bottom: 1px solid var(--grey-200);
    border-radius: 8px 8px 0 0;
    background-color: var(--grey-50);
}

.modal__body {
    flex: 1;
    /*display: flex;*/
    /*flex-direction: column;*/
    overflow-y: auto;
    padding: 1.5rem;
}

.modal__actions {
    /* position: sticky; */
    /* bottom: 0; */
    padding: 1.5rem;
    z-index: 1;
    border-top: 1px solid var(--grey-200);
    border-radius: 0 0 8px 8px;
    background-color: var(--grey-50);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
}

.modal__title {
    font-size: var(--text-base);
    font-weight: bold;
    /*margin-top: 1rem;*/
}

.modal__description {
    color: var(--grey-700);
    line-height: 1.5;
    font-size: var(--text-sm);
    margin-top: 0.25rem;
}

.modal__icon {
    all: unset;
    cursor: pointer;
}

.modal__search-container {
    width: 100%;
    display: flex;
    align-items: center;
    position: relative;
}


.modal__search-input {
    font-size: var(--text-sm);
    width: 100%;
    height: 2.5rem;
    display: inline-flex;
    padding: 0 0.875rem;
    background-color: white;
    border: 1px solid var(--grey-200);
    border-radius: 4px;
    box-shadow: none;
    box-sizing: border-box;
}

.modal__search-input:focus {
    outline: none;
    border: 1px solid var(--primary-blue);
}

.modal__search-suffix {
    appearance: none;
    position: absolute;
    display: inline-flex;
    right: 1rem;
    background-color: white;
    border: none;
}

.modal__search-submit {
    appearance: none;
    position: absolute;
    right: 0;
    width: 4rem;
    height: 100%;
    border: none;
    background-color: transparent;
    cursor: pointer;
}

.modal__form {
    width: 100%;
    max-height: 100vh; /* Fallback */
    max-height: 100dvh;
    flex: 1;
    display: flex;
    flex-direction: column;
    border-radius: 8px;
}

/*
.modal__form {
    width: 600px;
    max-width: 100%;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.modal__form-actions {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
    flex: 0 0 auto;
}
 */

.modal__fields {
    width: 100%;
}

.modal__input-container {
    margin-bottom: 0.875rem;
    width: 100%;
}

@media (min-width: 768px) {
    .modal {
        border: solid 1px var(--grey-200);
        border-radius: 8px;
        background-color: white;
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        max-width: 100%;
        max-height: 100%;
        /*width: 700px;*/
        /*height: 600px;*/
        width: auto;
        height: auto;
    }

    .modal__overlay {
        display: unset;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.1);

        z-index: 1000;
    }

    .modal__actions {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: flex-end;
        gap: 1rem;
    }

    .modal__form-actions {
        margin-top: 1.5rem;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: flex-end;
        gap: 1rem;
    }
}


/* Ship To
================================================== */
.m-shipto {
    width: 100%;
    max-height: 100vh; /* Fallback */
    max-height: 100dvh;
    flex: 1;
    display: flex;
    flex-direction: column;
    border-radius: 8px;
}

.m-shipto__body {
    margin-top: 1.5rem;
    width: 100%;
    flex-grow: 1;
    overflow-y:scroll;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--grey-200);
}

.m-shipto__item {
    font-size: var(--text-sm);
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: background-color .1s ease-out;
    margin: 0;
    padding: 1rem;
    border-top: 1px solid var(--grey-200);
}

.m-shipto__item:first-of-type {
    border: none;
}

.m-shipto__item:hover {
    background-color: var(--primary-50);
}

.m-shipto__item-title {
    color: var(--grey-900);
    font-size: var(--text-sm);
    line-height: 1.5rem;
    margin: 0;
}

.m-shipto__item-text {
    margin: 0;
    line-height: 1.2rem;
}

@media (min-width: 768px) {
    .m-shipto__body {
        width: 650px;
        max-width: 100%;
        height: 19rem;
    }
}

/* Location
================================================== */
.m-location {
    width: 100%;
    max-height: 100vh; /* Fallback */
    max-height: 100dvh;
    flex: 1;
    display: flex;
    flex-direction: column;
    border-radius: 8px;
}

.m-location__body {
    margin-top: 1.5rem;
    width: 100%;
    flex-grow: 1;
    overflow-y:scroll;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--grey-200);
}


.m-location__form {
    margin-top: 1.5rem;
    width: 650px;
    max-width: 100%;

    flex-grow: 1;

    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.m-location__form-body {
    overflow: hidden;
    overflow-y:scroll;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--grey-200);
    height: 28rem;
    max-height: 45vh;
}


.m-location__item {
    font-size: var(--text-sm);
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: background-color .1s ease-out;
    /*min-height: 6rem;*/
    margin: 0;
    padding: 1rem;
    border-top: 1px solid var(--grey-200);
}

.m-location__item:first-of-type {
    border: none;
}

.m-location__item:hover {
    background-color: var(--primary-50);
}

.m-location__item-title {
    color: var(--grey-900);
    font-size: var(--text-sm);
    line-height: 1.5rem;
    margin: 0;
}

.m-location__item-body {
    display: flex;
    flex-grow: 1;
    justify-content: space-between;
    align-items: end;
}

.m-location__item-text {
    margin: 0;
    line-height: 1.2rem;
}

.m-location__warning {
    margin-top: 0.75rem;
    color: var(--yellow-700);
}

@media (min-width: 768px) {
    .m-location__body {
        width: 650px;
        max-width: 100%;
        height: 19rem;
    }
}

/* /modal/avail.php
================================================== */
.m-availability__container {
    width: 100%;
    flex-grow: 1;
    overflow: hidden;
    overflow-y:scroll;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--grey-200);
}

.m-availability__link {
    color: var(--primary-500);
    display: inline-block;
    margin-top: 0.5rem;
}

.m-availability__link:hover {
    text-decoration: underline;
}

.m-availability__selected {
    display: inline-block;
    margin-left: 0.75rem;
    color: var(--green-700);
}

@media (min-width: 768px) {
    .m-availability__container {
        border-radius: 4px;
        border: 1px solid var(--slate-200);
        width: 650px;
        max-width: 100%;
        max-height: 26rem;
    }
}

/* /modal/prod.php
================================================== */
.m-prod {
    width: 100%;
    max-height: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    border-radius: 8px;
}

.m-prod__body {
    width: 100%;
    flex-grow: 1;
    overflow-y:scroll;
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    @media (min-width: 768px) {
        .m-prod__body {
            width: 650px;
            max-width: 100%;
            height: 10rem;
        }
    }
}

/* /modal/user/add.php
================================================== */
.m-user-add {
    width: 100%;
    max-height: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    border-radius: 8px;
}

.m-user-add__body {
    width: 100%;
    flex-grow: 1;
    overflow-y:scroll;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.m-user-add__form-body {
    overflow: hidden;
    overflow-y:scroll;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.m-user-add__fields {
    flex-basis: 50%;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.m-user-add__selectors {
    flex-basis: 50%;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

@media (min-width: 768px) {
    .m-user-add__body {
        width: 650px;
        max-width: 100%;
        height: 25rem;
        flex-direction: row;
        flex-wrap: nowrap;
    }
}

/* /modal/truck.php
================================================== */
.m-truck__body {
    width: 100%;
    flex-grow: 1;
    overflow-y:scroll;
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .m-truck__body {
        width: 650px;
        max-width: 100%;
        height: 16rem;
    }
}


/* /modal/line/notes.php
================================================== */
.m-line-notes__body {
    width: 100%;
    flex-grow: 1;
    overflow-y:scroll;
    display: flex;
    flex-direction: column;
}

.m-line-notes__prod-description {
    color: var(--slate-700);
}

.m-line-notes__content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.m-line-notes__info {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    padding: 1rem;
    background-color: var(--grey-50);
    border: 1px solid var(--grey-200);
    border-radius: 4px;
}

.m-line-notes__price-qty {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    justify-content: flex-start;
}

.m-line-notes__price {
    font-weight: bold;
}

.m-line-notes__input-qty {
    font-style: var(--text-sm);
    height: 2.5rem;
    padding: 0 0.875rem;
    border: 1px solid var(--grey-200);
    border-radius: 4px;
    box-shadow: none;
}

.m-line-notes__stock-legend {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-top: 0.75rem;
    width: 100%;
}

@media (min-width: 768px) {
    .m-line-notes__body {
        width: 650px;
        max-width: 100%;
        height: 22rem;
    }
}

/* /modal/options.php
================================================== */
.m-options__body {
    width: 100%;
    flex-grow: 1;
    overflow-y:scroll;
    display: flex;
    flex-direction: column;
}

.m-options__table-container {
    max-width: 100%;
    height: 100%;
    overflow-y: scroll;
    border: 1px solid var(--grey-200);
    border-radius: 4px;
}

.m-options__table {
    width: 100%;
    font-size: var(--text-sm);
    border-spacing: 0;
    border-collapse: collapse;
}

.m-options__thead {
    position: sticky;
    top: 0;
    z-index: 1;
}

.m-options__cell {
    text-align: left;
    padding: 1rem 1.5rem;
    white-space: nowrap;
}

.m-options__cell--head {
    border-bottom: 1px solid var(--slate-100);
    background-color: var(--grey-50);
}

.m-options__cell--right {
    text-align: right;
}

.m-options__price {
    width: 100px;
}

.m-options__tbody {
    color: var(--slate-700);
}

.m-options__row:not(:last-of-type) {
    border-bottom: 1px solid var(--slate-100);
}

.m-options__item-no {
    text-decoration: underline;
    color: var(--slate-900);
    font-weight: 700;
}

.m-options__item-desc {
    margin-top: 0.5rem;
}

@media (min-width: 768px) {
    .m-options__body {
        width: 750px;
        max-width: 100%;
        height: 28rem;
    }
}

/* /modal/warranty.php
================================================== */
.m-warranty-add__body {
    width: 100%;
    flex-grow: 1;
    overflow-y:scroll;
    display: flex;
    flex-direction: column;
}

.m-warranty-add__item {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1rem;
    width: 100%;
    align-items: flex-start;
}

.m-warranty-add__fields {
    width: 100%;
    padding: 1.5rem 0;
}

.m-warranty-add__img-container {
    flex-basis: 30%;
    height: auto;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--grey-200);
    background-color: transparent;
    border-radius: 4px;
    position: relative;
}

.m-warranty-add__img {
    width: 55%;
    aspect-ratio: 1/1;
    object-fit: contain;
}

.m-warranty-add__img-warranty {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    width: 25%;
}

.m-warranty-add__details {
    flex-basis: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.m-warranty-add__title {
    font-weight: bold;
    margin-bottom: 0.25rem;
    font-size: var(--text-sm);
}

.m-warranty-add__description {
    flex-basis: 70%;
    font-size: var(--text-sm);
    color: var(--slate-700);
    line-height: 1.3;
}

.m-warranty-add__pricing {
    font-weight: bold;
    margin-top: 1rem;
    padding-right: 1rem;
    font-size: var(--text-base);
    text-align: right;
}

.m-warranty-add__form {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.m-warranty-add__legend {
    color: var(--slate-700);
    text-align: center;
}

.m-warranty-add__actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.m-warranty-add__input-container {
    margin-bottom: 0.875rem;
    width: 100%;
}

@media only screen and (max-height: 668px) {
    .m-warranty-add__img-container {
        display: none;
    }
}

@media (min-width: 768px) {
    .m-warranty-add__body {
        width: 650px;
        max-width: 100%;
        height: 27rem;
    }

    .m-warranty-add__item {
        flex-wrap: nowrap;
    }

    .m-warranty-add__img-container {
        flex-basis: 20%;
    }

    .m-warranty-add__details {
        flex-basis: 80%;
    }

    .m-warranty-add__pricing {
        font-size: var(--text-lg);
    }

    .m-warranty-add__img {
        width: 60%;
    }
}

@media only screen and (min-width: 993px) {
    .m-warranty-add__img-container {
        flex-basis: 30%;
    }

    .m-warranty-add__img {
        width: 60%;
    }

    .m-warranty-add__details {
        flex-basis: 70%;
    }

    .m-warranty-add__pricing {
        font-size: var(--text-xl);
    }
}

/* Order
================================================== */
.m-order__body {
    width: 750px;
    max-width: 100%;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.m-order__summary {
    padding: 1rem;
    /*background-color: var(--grey-50);*/
    border: 1px solid var(--grey-200);
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.m-order__summary-row {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1rem;
    /*justify-content: space-between;*/
}

.m-order__summary-item {
    flex-basis: calc(50% - 1rem);
    font-size: var(--text-sm);
    display: flex;
    flex-direction: column;
}

.m-order__label {
    font-size: var(--text-xs);
}

.m-order__action {
    margin-top: 0.5rem;
    /*
    outline: none;
    box-shadow: none;
    border-radius: 5px;
    border: solid 1px var(--grey-700);
    */
    align-self: flex-end;
}

.m-order__table-container {
    border: 1px solid var(--grey-200);
    border-radius: 4px;
    max-width: 100%;
    max-height: 20rem;
    overflow: scroll;
}

.m-order__table {
    width: 100%;
    font-size: var(--text-sm);
    border-spacing: 0;
    border-collapse: collapse;
}

.m-order__thead {
    position: sticky;
    top: 0;
    z-index: 1;
}

@media (min-width: 768px) {
    .m-order__summary-row {
        flex-wrap: nowrap;
    }
}

@media only screen and (min-width: 993px) {
    .m-order__summary-item {
        flex-basis: 25%;
    }
}

/* Upload Orders - /component/upload/wizard
================================================== */
.m-wizard__body {
    width: 100%;
    flex-grow: 1;
    overflow-y:scroll;
    display: flex;
    flex-direction: column;
}

.m-wizard__title {
    font-style: var(--text-base);
    color: var(--grey-700);
    font-weight: bold;
    margin-bottom: 0.25rem;
}

@media (min-width: 768px) {
    .m-wizard__body {
        min-width: 700px;
        max-width: 100%;
        /*height: 28rem;*/
    }
}

/* Deactivate User - /modal/user/deactivate.php
================================================== */
.m-user-deactivate {
    width: 100%;
    max-height: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    border-radius: 8px;
}

.m-user-deactivate__body {
    width: 100%;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    min-height: 100%;
}

.m-user-deactivate__profile {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    align-items: center;
    border: 1px solid var(--grey-200);
    border-radius: 4px;
    padding: 1rem;
    background-color: var(--grey-50);
}

.m-user-deactivate__icon-container {
    min-width: 3rem;
    min-height: 3rem;
    border: 1px solid var(--slate-300);
    border-radius: 99px;
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-500);
}

.m-user-deactivate__profile-name {
    font-size: var(--text-base);
    margin-bottom: 0.25rem;
    font-weight: 700;
}

.m-user-deactivate__profile-email,
.m-user-deactivate__profile-title {
    font-size: var(--text-sm);
    color: var(--slate-700);
    margin-bottom: 2px;
}

.m-user-deactivate__list {
    font-size: var(--text-sm);
    /*color: var(--slate-700);*/
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 0;
}

.m-user-deactivate__checkbox {
    display: flex;
    gap: 0.875rem;
    padding: 0.875rem;
    color: var(--yellow-800);
    border-radius: 4px;
    font-size: var(--text-sm);
    border: 1px solid var(--yellow-400);
    background-color: var(--yellow-50);
}

.m-user-deactivate__captcha {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.m-user-deactivate__captcha-link {
    align-self: end;
    font-size: var(--text-sm);
}


@media (min-width: 768px) {
    .m-user-deactivate__body {
        width: 600px;
        max-width: 100%;
        /*flex-direction: row;*/
        /*flex-wrap: nowrap;*/
    }
}

/* Modal Store - /modal/store.php
================================================== */
.m-store {
    width: 100%;
    max-height: 100%;
    flex: 1;
    display: flex;
    flex-direction: column-reverse;
    border-radius: 8px;
    gap: 1rem;
}

.m-store__details {
    display: flex;
    gap: 1rem;
    /*flex-basis: 100%;*/
    flex-direction: column;

    font-size: var(--text-sm);
    line-height: 1.5;
}

.m-store__map {
    /*flex-basis: 100%;*/
    height: 250px;
    border: 1px solid var(--grey-200);
}

.m-store__header {
    font-weight: bold;
    margin-top: 1rem;
}

.m-store__subtag {
    font-size: var(--text-xs);
}

.m-store__title {
    font-size: var(--text-base);
}

.m-store__icon {
    margin-right: 0.5rem;
}

.m-store__hours {
    margin-top: 0.75rem;
}

.time-open {
    color: var(--green-800);
    font-weight: bold;
}

.time-closed {
    color: var(--red-800);
    font-weight: bold;
}

@media (min-width: 768px) {
    .m-store {
        width: 800px;
        max-width: 100%;
        height: 100%;
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: space-between;
    }

    .m-store__details {
        flex-basis: calc(40% - 0.5rem);
    }

    .m-store__map {
        flex-basis: calc(60% - 0.5rem);
        height: 450px;
        border: 1px solid var(--grey-200);
    }
}

/* Modal Image/File Confirmation
================================================== */
.m-image {
    width: 100%;
    flex-grow: 1;
    overflow-y:scroll;
    display: flex;
    flex-direction: column;
}

.m-image__img-container {
    height: 20rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--grey-200);
}

.m-image__img {
    max-width: 100%;
}

@media (min-width: 768px) {
    .m-image {
        width: 650px;
        max-width: 100%;
        height: 100%;
    }
}

/* Order Disputes - /modal/order/dispute
================================================== */
.m-dispute {
    width: 100%;
    flex-grow: 1;
    overflow-y:scroll;
    display: flex;
    flex-direction: column;
}

.m-dispute__body {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.m-dispute__table-container {
    overflow: hidden;
    overflow-y: scroll;
    max-height: 152px;
}

.m-dispute__row {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.m-dispute__actions {
    margin-top: 0.875rem;
    text-align: right;
}

.m-dispute__total {
    text-align: right;
    color: var(--slate-700);
    font-size: var(--text-sm);
    padding: 0.75rem 1.25rem;
    border-radius: 4px;
    border: solid 1px var(--grey-200);
}

@media (min-width: 768px) {
    .m-dispute {
        width: 600px;
        max-width: 100%;
        height: 100%;
    }
}

/* Disputes - /modal/dispute
================================================== */
.m-dispute__title {
    font-size: var(--text-base);
    margin-bottom: 0.5rem;
}

.m-dispute__description {
    color: var(--slate-700);
    font-size: var(--text-sm);
    line-height: 1.25;
}

.m-dispute__list {
    margin-top: 0.5rem;
}

/* Upload Order - /component/upload/orders
================================================== */
.m-upload-orders {
    width: 100%;
    flex-grow: 1;
    overflow-y:scroll;
    display: flex;
    flex-direction: column;
    font-size: var(--text-sm);
}

.m-upload-orders__title {
    font-size: var(--text-base);
    margin-bottom: 0.5rem;
}

.m-upload-orders__body {
    height: 100%;
    padding: 1rem;
}

.m-upload-orders__checkbox {
    padding: 1rem;
    border: 1px solid var(--grey-200);
    background-color: var(--grey-50);
    display: flex;
    gap: 0.5rem;
    color: var(--slate-700);
}

@media (min-width: 768px) {
    .m-upload-orders {
        width: 600px;
        max-width: 100%;
        height: 100%;
    }
}

