.quick-order-page {
    max-width: @wrapper_width_narrow;
    margin: 0 auto;
    padding: @content_padding_top @wrapper_padding @content_padding_bottom;

    h1 {
        margin: 0 0 24px;
    }
}

.quick-order-search {
    margin: 0 0 32px;
}

.quick-order-search__input {
    width: 100%;
    padding: 12px 16px;
    .rems(16);
    border: 1px solid var(--border_color);
    border-radius: @border_radius;
    outline: none;
    transition: border-color 200ms ease;

    &:focus {
        border-color: var(--highlight_color, @primary_color);
    }
}

.quick-order-loading {
    display: flex;
    justify-content: center;
    padding: 40px 0;
}

.quick-order-results__header {
    display: none;

    @media all and (min-width: @medium_width) {
        display: grid;
        grid-template-columns: 60px 1fr 100px 180px 100px 160px;
        gap: 16px;
        align-items: center;
        padding: 8px 16px;
        border-bottom: 2px solid var(--border_color);
        .rems(13);
        font-weight: 600;
        color: var(--text_color);
    }
}

.quick-order-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid var(--border_color);
    transition: background-color 150ms ease;

    &:hover {
        background-color: var(--light_color);
    }

    &--out-of-stock {
        opacity: 0.6;
    }

    @media all and (min-width: @medium_width) {
        display: grid;
        grid-template-columns: 60px 1fr 100px 180px 100px 160px;
        gap: 16px;
        flex-wrap: nowrap;
    }
}

.quick-order-row__image {
    width: 60px;
    height: 60px;
    flex-shrink: 0;

    img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: @border_radius;
    }
}

.quick-order-row__info {
    flex: 1 1 auto;
    min-width: 0;

    @media all and (max-width: @medium_width) {
        flex: 1 1 calc(100% - 80px);
    }
}

.quick-order-row__name {
    display: block;
    font-weight: 500;
    color: inherit;
    text-decoration: none;
    .rems(15);

    &:hover {
        color: var(--highlight_color, @primary_color);
    }
}

.quick-order-row__badge {
    display: inline-block;
    padding: 2px 8px;
    margin-top: 4px;
    .rems(11);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 3px;
    background-color: var(--highlight_color, @primary_color);
    color: var(--text_color_light);
}

.quick-order-row__price {
    .rems(15);
    font-weight: 600;

    @media all and (max-width: @medium_width) {
        width: 100%;
    }
}

.quick-order-row__price--original {
    text-decoration: line-through;
    color: var(--border_color_dark);
    font-weight: 400;
    margin-right: 6px;
    .rems(13);
}

.quick-order-row__price--current {
    color: inherit;
}

.quick-order-row__size {
    @media all and (max-width: @medium_width) {
        width: 100%;
    }

    .productSizes {
        padding: 0;
    }
}

.quick-order-row__quantity {
    @media all and (max-width: @medium_width) {
        width: 120px;
    }
}

.quick-order-row__action {
    text-align: right;

    @media all and (min-width: @medium_width) {
        grid-column: 6;
    }

    @media all and (max-width: @medium_width) {
        flex: 1;
    }

    .quick-order-row--assessment & {
        @media all and (min-width: @medium_width) {
            grid-column: 5 / 7;
        }
    }
}

.quick-order-row__btn {
    width: 100%;

    &.is-loading {
        opacity: 0.6;
        pointer-events: none;
    }
}

.quick-order-row__out-of-stock {
    .rems(14);
    font-weight: 500;
    color: var(--border_color_dark);
}

.quick-order-row__message {
    margin-top: 6px;
    .rems(13);

    &--success {
        color: var(--success_color);
    }

    &--error {
        color: var(--alert_color);
    }
}

.quick-order-empty {
    text-align: center;
    padding: 40px 0;
    color: var(--text_color);
    .rems(15);
}

// Modal
.quick-order-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.5);
}

.quick-order-modal__dialog {
    background: var(--background_color);
    border-radius: @border_radius;
    max-width: 480px;
    width: 90%;
    padding: 32px;
    text-align: center;
}

.quick-order-modal__title {
    margin: 0 0 16px;
    .rems(22);
}

.quick-order-modal__text {
    margin: 0 0 12px;
    .rems(15);
    color: var(--text_color);
    line-height: 1.5;
}

.quick-order-modal__actions {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.quick-order-modal__continue {
    display: inline-block;
    width: 100%;
    text-align: center;
    text-decoration: none;
}

.quick-order-modal__cancel {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text_color);
    .rems(14);
    padding: 4px 8px;

    &:hover {
        color: var(--text_color);
    }
}
