/*
|--------------------------------------------------------------------------
| Artisan Walks — Recent / Popular Product Popup
|--------------------------------------------------------------------------
| Compact fixed-size layout.
| Product image proportions can NEVER change the popup dimensions.
|--------------------------------------------------------------------------
*/

.aw-recent-purchase-popup {
    position: fixed;
    left: 16px;
    bottom: 22px;
    z-index: 2147483000;

    display: grid;
    width: min(350px, calc(100vw - 32px));
    height: 124px;
    min-height: 124px;
    max-height: 124px;

    grid-template-columns: 98px minmax(0, 1fr);

    overflow: hidden;
    border: 1px solid rgba(20, 20, 20, .12);
    border-radius: 9px;
    background: #ffffff;
    color: #1b1b1b;

    box-shadow:
        0 12px 34px rgba(15, 15, 15, .16),
        0 2px 8px rgba(15, 15, 15, .07);

    opacity: 0;
    visibility: hidden;
    transform: translate3d(-14px, 14px, 0);

    transition:
        opacity .28s ease,
        transform .28s ease,
        visibility .28s ease;

    pointer-events: none;
    box-sizing: border-box;
}

.aw-recent-purchase-popup[hidden] {
    display: none !important;
}

.aw-recent-purchase-popup.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translate3d(0, 0, 0);
    pointer-events: auto;
}

/*
|--------------------------------------------------------------------------
| Fixed image box
|--------------------------------------------------------------------------
| A tall Shoe Tree, a wide shoe, a boot, belt, wallet, etc. is scaled INSIDE
| this box. Its natural aspect ratio cannot increase the card height.
|--------------------------------------------------------------------------
*/

.aw-recent-purchase-image-link {
    display: flex;
    width: 98px;
    height: 124px;
    min-width: 98px;
    max-width: 98px;
    min-height: 124px;
    max-height: 124px;

    align-items: center;
    justify-content: center;

    overflow: hidden;
    border-right: 1px solid #eee9e1;
    background: #f7f5f1;
    text-decoration: none;
    box-sizing: border-box;
}

.aw-recent-purchase-image-link img {
    display: block;

    width: 100% !important;
    height: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: 100% !important;
    max-height: 100% !important;

    padding: 8px;

    object-fit: contain !important;
    object-position: center !important;

    background: transparent;
    box-sizing: border-box;
}

/*
|--------------------------------------------------------------------------
| Content
|--------------------------------------------------------------------------
*/

.aw-recent-purchase-content {
    position: relative;

    display: flex;
    min-width: 0;
    height: 124px;
    min-height: 124px;
    max-height: 124px;

    flex-direction: column;
    justify-content: center;

    overflow: hidden;
    padding: 12px 35px 11px 14px;

    color: #1b1b1b;
    box-sizing: border-box;
}

.aw-recent-purchase-close {
    position: absolute;
    top: 7px;
    right: 7px;

    display: inline-flex;
    width: 25px;
    height: 25px;

    align-items: center;
    justify-content: center;

    padding: 0;
    border: 0;
    border-radius: 50%;

    background: transparent;
    color: #77716a;

    font-family: Arial, sans-serif;
    font-size: 20px;
    font-weight: 400;
    line-height: 1;

    cursor: pointer;
    transition:
        background .15s ease,
        color .15s ease;
}

.aw-recent-purchase-close:hover,
.aw-recent-purchase-close:focus-visible {
    background: #f0ede8;
    color: #111111;
    outline: none;
}

.aw-recent-purchase-label {
    display: block;
    overflow: hidden;

    margin: 0 0 3px;

    color: #94651f;

    font-size: 9px;
    font-weight: 800;
    letter-spacing: .75px;
    line-height: 1.2;
    text-transform: uppercase;

    text-overflow: ellipsis;
    white-space: nowrap;
}

.aw-recent-purchase-content strong {
    display: block;
    overflow: hidden;

    margin: 0 0 3px;

    color: #4b4844;

    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;

    text-overflow: ellipsis;
    white-space: nowrap;
}

.aw-recent-purchase-title {
    display: -webkit-box;
    overflow: hidden;

    max-height: 36px;
    margin: 0 0 4px;

    color: #9a5c22;

    font-size: 13px;
    font-weight: 800;
    line-height: 1.35;
    text-decoration: none;

    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.aw-recent-purchase-title:hover,
.aw-recent-purchase-title:focus-visible {
    color: #171717;
    text-decoration: underline;
}

.aw-recent-purchase-content small {
    display: block;
    overflow: hidden;

    margin: 0;

    color: #858078;

    font-size: 10.5px;
    line-height: 1.25;

    text-overflow: ellipsis;
    white-space: nowrap;
}

/*
|--------------------------------------------------------------------------
| Mobile
|--------------------------------------------------------------------------
*/

@media (max-width: 575.98px) {
    .aw-recent-purchase-popup {
        left: 10px;
        bottom: 92px;

        width: min(318px, calc(100vw - 20px));
        height: 108px;
        min-height: 108px;
        max-height: 108px;

        grid-template-columns: 82px minmax(0, 1fr);

        border-radius: 8px;
    }

    .aw-recent-purchase-image-link {
        width: 82px;
        min-width: 82px;
        max-width: 82px;

        height: 108px;
        min-height: 108px;
        max-height: 108px;
    }

    .aw-recent-purchase-image-link img {
        padding: 7px;
    }

    .aw-recent-purchase-content {
        height: 108px;
        min-height: 108px;
        max-height: 108px;

        padding: 9px 31px 9px 11px;
    }

    .aw-recent-purchase-label {
        margin-bottom: 2px;
        font-size: 8px;
    }

    .aw-recent-purchase-content strong {
        margin-bottom: 2px;
        font-size: 10.5px;
    }

    .aw-recent-purchase-title {
        max-height: 32px;
        margin-bottom: 3px;
        font-size: 12px;
        line-height: 1.3;
    }

    .aw-recent-purchase-content small {
        font-size: 9.5px;
    }

    .aw-recent-purchase-close {
        top: 5px;
        right: 5px;
        width: 23px;
        height: 23px;
        font-size: 18px;
    }
}

@media (max-width: 350px) {
    .aw-recent-purchase-popup {
        width: calc(100vw - 16px);
        left: 8px;
        grid-template-columns: 76px minmax(0, 1fr);
    }

    .aw-recent-purchase-image-link {
        width: 76px;
        min-width: 76px;
        max-width: 76px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .aw-recent-purchase-popup {
        transition: none;
    }
}
