/**
 * Alamarte Phoca Cart Mini Cart 1.0.3
 * GNU General Public License version 3 or later
 */
.alamarte-phocacart-minicart {
    --alm-minicart-width: 440px;
    --alm-minicart-max-height: 560px;
    position: relative;
    box-sizing: border-box;
    max-width: 100%;
}

.alamarte-phocacart-minicart *,
.alamarte-phocacart-minicart *::before,
.alamarte-phocacart-minicart *::after {
    box-sizing: border-box;
}

.alamarte-phocacart-minicart__trigger,
.alamarte-phocacart-minicart__heading {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
}

.alamarte-phocacart-minicart__trigger {
    appearance: none;
    border: 1px solid rgba(0, 0, 0, .16);
    border-radius: .5rem;
    background: transparent;
    color: inherit;
    font: inherit;
    line-height: 1.2;
    padding: .55rem .75rem;
    cursor: pointer;
}

.alamarte-phocacart-minicart__trigger-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.45rem;
    min-height: 1.45rem;
    padding: 0 .35rem;
    border-radius: 999px;
    background: #212529;
    color: #fff;
    font-size: .75rem;
    font-weight: 700;
    line-height: 1;
}


.alamarte-phocacart-minicart__panel {
    width: min(var(--alm-minicart-width), calc(100vw - 30px));
    max-width: 100%;
    background: #fff;
    color: #212529;
    border: 1px solid rgba(0, 0, 0, .12);
    border-radius: .75rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .12);
    padding: .85rem;
    z-index: 1000;
}

.alamarte-phocacart-minicart--integrated .alamarte-phocacart-minicart__panel,
.alamarte-phocacart-minicart--inline .alamarte-phocacart-minicart__panel {
    width: 100%;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    background: transparent;
}

.alamarte-phocacart-minicart--dropdown .alamarte-phocacart-minicart__panel {
    position: absolute;
    top: calc(100% + .5rem);
}

.alamarte-phocacart-minicart--align-end .alamarte-phocacart-minicart__panel {
    right: 0;
}

.alamarte-phocacart-minicart--align-start .alamarte-phocacart-minicart__panel {
    left: 0;
}

.alamarte-phocacart-minicart__scroll {
    max-height: var(--alm-minicart-max-height);
    overflow: auto;
    overscroll-behavior: contain;
}

.alamarte-phocacart-minicart__native {
    min-width: 0;
    overflow-x: hidden;
}

/* Compact the native Phoca Cart checkout renderer inside the mini-cart. */
.alamarte-phocacart-minicart__native .ph-checkout-cart-row-header {
    display: none !important;
}

.alamarte-phocacart-minicart__native .ph-checkout-cart-row-item {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
        "title price"
        "quantity price";
    gap: .35rem .75rem;
    align-items: center;
    margin: 0 !important;
    padding: .7rem 0;
}

.alamarte-phocacart-minicart.alm-minicart-show-images .ph-checkout-cart-row-item {
    grid-template-columns: 58px minmax(0, 1fr) auto;
    grid-template-areas:
        "image title price"
        "image quantity price";
}

.alamarte-phocacart-minicart__native .ph-checkout-cart-row-item > [class*="col-"] {
    width: auto !important;
    max-width: none !important;
    flex: none !important;
    padding: 0 !important;
}

.alamarte-phocacart-minicart__native .ph-checkout-cart-image {
    grid-area: image;
}

.alamarte-phocacart-minicart.alm-minicart-hide-images .ph-checkout-cart-image {
    display: none !important;
}

.alamarte-phocacart-minicart__native .ph-checkout-cart-title {
    grid-area: title;
    min-width: 0;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.alamarte-phocacart-minicart__native .ph-checkout-cart-quantity {
    grid-area: quantity;
    min-width: 0;
}

.alamarte-phocacart-minicart__native .ph-checkout-cart-brutto {
    grid-area: price;
    white-space: nowrap;
    text-align: right;
    font-weight: 600;
}

.alamarte-phocacart-minicart__native .ph-checkout-cart-netto,
.alamarte-phocacart-minicart__native .ph-checkout-cart-tax {
    display: none !important;
}

.alamarte-phocacart-minicart__native form.phItemCartUpdateBoxForm {
    margin: .25rem 0 0;
}

.alamarte-phocacart-minicart__native form.phItemCartUpdateBoxForm .input-group,
.alamarte-phocacart-minicart__native form.phItemCartUpdateBoxForm [class*="input-group"] {
    display: inline-flex;
    flex-wrap: nowrap;
    width: auto;
    max-width: 190px;
}

.alamarte-phocacart-minicart__native form.phItemCartUpdateBoxForm input[type="text"],
.alamarte-phocacart-minicart__native form.phItemCartUpdateBoxForm input[type="number"] {
    min-width: 44px;
    max-width: 72px;
}

.alamarte-phocacart-minicart__native .ph-checkout-cart-row-attributes {
    margin: 0 0 .5rem !important;
    padding: 0 !important;
    font-size: .875rem;
}

.alamarte-phocacart-minicart.alm-minicart-hide-attributes .ph-checkout-cart-row-attributes {
    display: none !important;
}

.alamarte-phocacart-minicart__native .ph-checkout-cart-row-hr {
    margin: 0 !important;
}

.alamarte-phocacart-minicart__native .ph-hr {
    margin: .25rem 0 !important;
}

.alamarte-phocacart-minicart__native .ph-checkout-cart-box > .row:not(.ph-checkout-cart-row-item):not(.ph-checkout-cart-row-header):not(.ph-checkout-cart-row-attributes):not(.ph-checkout-cart-row-hr),
.alamarte-phocacart-minicart__native .ph-checkout-cart-box > [class*="row"]:not(.ph-checkout-cart-row-item):not(.ph-checkout-cart-row-header):not(.ph-checkout-cart-row-attributes):not(.ph-checkout-cart-row-hr) {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.alamarte-phocacart-minicart__native img {
    max-width: 58px;
    height: auto;
}

/* Keep Phoca Cart subtotal/total labels and formatted currency values on one line. */
.alamarte-phocacart-minicart__native .ph-checkout-cart-row-subtotal {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) max-content;
    column-gap: .75rem;
    align-items: baseline;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.alamarte-phocacart-minicart__native .ph-checkout-cart-row-subtotal > [class*="col-"] {
    width: auto !important;
    max-width: none !important;
    flex: none !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.alamarte-phocacart-minicart__native .ph-checkout-cart-row-subtotal > :first-child:empty {
    display: none !important;
}

.alamarte-phocacart-minicart__native .ph-checkout-cart-row-subtotal > :last-child {
    min-width: max-content;
    white-space: nowrap !important;
    text-align: right;
}

.alamarte-phocacart-minicart__empty,
.alamarte-phocacart-minicart__error {
    padding: .85rem;
    text-align: center;
}

.alamarte-phocacart-minicart__status {
    min-height: 0;
    margin-top: .4rem;
    font-size: .875rem;
}

.alamarte-phocacart-minicart__status:empty {
    display: none;
}

.alamarte-phocacart-minicart__actions {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
    justify-content: flex-end;
    border-top: 1px solid rgba(0, 0, 0, .1);
    margin-top: .75rem;
    padding-top: .75rem;
}

.alamarte-phocacart-minicart__clear,
.alamarte-phocacart-minicart__checkout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    border-radius: .45rem;
    padding: .45rem .75rem;
    font: inherit;
    line-height: 1.2;
    text-decoration: none;
}

.alamarte-phocacart-minicart__clear {
    border: 1px solid rgba(0, 0, 0, .22);
    background: transparent;
    color: inherit;
    cursor: pointer;
}

.alamarte-phocacart-minicart__checkout {
    border: 1px solid currentColor;
}

.alamarte-phocacart-minicart.is-busy {
    opacity: .72;
}

.alamarte-phocacart-minicart.is-busy form.phItemCartUpdateBoxForm button,
.alamarte-phocacart-minicart.is-busy [data-alamarte-minicart-clear] {
    pointer-events: none;
}

.alamarte-phocacart-minicart [hidden] {
    display: none !important;
}

@media (max-width: 575.98px) {
    .alamarte-phocacart-minicart__panel {
        width: min(var(--alm-minicart-width), calc(100vw - 20px));
    }

    .alamarte-phocacart-minicart__native .ph-checkout-cart-row-item,
    .alamarte-phocacart-minicart.alm-minicart-show-images .ph-checkout-cart-row-item {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "title price"
            "quantity quantity";
    }

    .alamarte-phocacart-minicart__native .ph-checkout-cart-image {
        display: none !important;
    }

    .alamarte-phocacart-minicart__actions {
        justify-content: stretch;
    }

    .alamarte-phocacart-minicart__clear,
    .alamarte-phocacart-minicart__checkout {
        flex: 1 1 100%;
    }
}
