/*
 * Amasty Ajax Cart — Hyvä-compatible CSS
 * Converted from the module's LESS source (_module.less).
 *
 * Conversion notes:
 * - All LESS UI-library mixins (.lib-css, .lib-vendor-prefix-display,
 *   .lib-vendor-box-align) resolved to plain CSS properties.
 * - `& when (@media-common = true)` was just a LESS build-tier guard — removed,
 *   rules below are the plain unwrapped output.
 * - `.media-width(@extremum, @break) when (@extremum='min') and (@break=@screen__m)`
 *   → `@media (min-width: 768px)`. 768px is Luma's stock @screen__m value —
 *   confirm this theme didn't override it before relying on this breakpoint.
 * - `&:extend(.hide)` → `display: none;` applied directly to each selector.
 * - Every @am-* LESS variable became a CSS custom property below. Anything
 *   marked CONFIRM is a guess/placeholder — pull the real value from Amasty's
 *   _variables.less (icon colors/images, sizes) before shipping this.
 * - IMPORTANT: this file only covers the CSS. The JS/markup that drives this
 *   popup (#confirmOverlay, #confirmBox, #amprogress, Owl Carousel classes)
 *   is generated by Amasty_Cart's own RequireJS/jQuery/Knockout component —
 *   that still needs its own Hyvä conversion (or an official Amasty Hyvä
 *   compatibility module, if one exists) for these selectors to ever appear
 *   in the DOM. This CSS alone doesn't make the feature work under Hyvä.
 */

:root {
    --am-required-color: #e02b27;
    --am-text-font-size: 14px;

    /* CONFIRM: real Amasty defaults — sizes are guesses */
    --am-button-width: 100%;
    --am-button-margin: 10px;
    --am-button-m-margin: 16px;

    /* CONFIRM: icon assets — Amasty ships these as sprite/SVG background images */
    --am-actions-icon-bg-color: #fff;
    --am-icon-wishlist: none;
    --am-icon-wishlist-hover: none;
    --am-icon-compare: none;
    --am-icon-compare-hover: none;
    --am-actions-icon-mobile-color: #7d7d7d;
    --am-actions-secondary-size: 36px;

    /* CONFIRM: popup/grid sizing */
    --am-button-secondary-bg: #eee;
    --am-confirmbox-width: 600px;
    --am-product-item-width: 33.33%;
    --am-slider-arrow-bg: none;
}

/* ==========================================================================
   Common
   ========================================================================== */

.hide {
    display: none;
}

.amcart-message-box,
.am-related-box {
    min-width: 320px;
}

.amcart-message-box.required,
.am-related-box.required {
    color: var(--am-required-color);
}

.amcart-message-box.actions,
.am-related-box.actions,
.amcart-message-box .action.back.customization,
.am-related-box .action.back.customization {
    display: none;
}

.amcart-message-box.price-box,
.am-related-box.price-box {
    margin: 5px 0 0 10px;
}

.amcart-message-box.price-box p,
.am-related-box.price-box p {
    margin: 0;
    padding: 0;
}

.amcart-message-box .text,
.am-related-box .text {
    font-size: var(--am-text-font-size);
    font-weight: normal;
}

/* Override Magento styles */
.amcart-message-box .product-info-main,
.am-related-box .product-info-main {
    float: none;
    width: auto !important;
}

.amcart-message-box .related,
.am-related-box .related {
    margin: 0 auto;
    width: 320px;
}

.amcart-message-box .product-add-form,
.am-related-box .product-add-form {
    margin: 0 25px;
    text-align: left;
}

.amcart-message-box .product-item-actions,
.am-related-box .product-item-actions {
    display: block;
}

.amcart-message-box .amcart-subtotal,
.am-related-box .amcart-subtotal {
    font-size: 14px;
}

.amcart-message-box #amcart-count,
.am-related-box #amcart-count {
    margin-bottom: 0;
    font-size: 14px;
}

.amcart-message-box .stock.unavailable,
.am-related-box .stock.unavailable {
    margin-top: 10px;
}

.amcart-message-box {
    margin: 40px auto 13px;
}

.amcart-message-box .product-options-bottom .actions,
.amcart-message-box .box-tocart .actions {
    display: none;
}

.am-related-box {
    margin: 20px auto 13px;
}

.am-related-box .am-title {
    text-transform: uppercase;
    color: #333;
}

.am-related-box .am-product-image.product {
    position: relative;
    margin: 0 0 5px 0;
}

.am-related-box .products-crosssell .product-item {
    padding: 0;
}

#confirmOverlay {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, .15);
}

#confirmOverlay img {
    display: inline;
}

#confirmBox {
    position: relative;
    height: auto;
    max-height: 88vh;
    max-width: 100%;
    text-align: center;
    z-index: 9999;
    box-shadow: 0 5px 10px rgba(0, 0, 0, .25);
    border-radius: 9px;
    overflow-y: auto;
}

#confirmBox > p {
    text-shadow: 1px 1px 0 rgba(255, 255, 255, .6);
    line-height: normal;
    font-weight: normal;
    background: none;
    font-size: 16px;
}

#confirmBox > .cross {
    position: absolute;
    top: 5px;
    right: 10px;
    color: rgba(0, 0, 0, .25);
    font-size: 21px;
    z-index: 9;
}

#confirmBox > .cross:hover {
    cursor: pointer;
    color: rgba(0, 0, 0, .45);
}

#confirmBox .am-actions-wrapper > .towishlist,
#confirmBox .am-actions-wrapper > .tocompare {
    background: var(--am-actions-icon-bg-color) no-repeat center;
    background-size: 60%;
}

#confirmBox .am-actions-wrapper > .towishlist:before,
#confirmBox .am-actions-wrapper > .tocompare:before {
    content: '';
}

#confirmBox .am-actions-wrapper > .towishlist {
    background-image: var(--am-icon-wishlist);
}

#confirmBox .am-actions-wrapper > .towishlist:hover {
    background-image: var(--am-icon-wishlist-hover);
}

#confirmBox .am-actions-wrapper > .tocompare {
    background-image: var(--am-icon-compare);
}

#confirmBox .am-actions-wrapper > .tocompare:hover {
    background-image: var(--am-icon-compare-hover);
}

#confirmBox .product-item-name {
    margin: 0 0 10px;
}

#confirmBox .am-slider {
    margin: 15px 0 0 0;
}

#confirmBox .actions-secondary .action {
    color: var(--am-actions-icon-mobile-color);
}

#confirmBox .product-item .price-box {
    margin: 0 0 15px;
}

#confirmBox .product-options-bottom .product-social-links {
    display: none;
}

/* Rewrite Magento styles */
#confirmBox .product-options-bottom .grouped .price-box .price-container .price,
#confirmBox .product-options-bottom .grouped .price-box .price-container {
    font-size: 14px;
    line-height: 20px;
}

#confirmBox .product-options-bottom .box-tocart {
    margin-top: 20px;
}

.amcart-confirm-buttons {
    margin: 20px auto;
}

.amcart-confirm-buttons .button {
    position: relative;
    display: inline-block;
    height: 50px;
    width: var(--am-button-width);
    font-weight: normal;
    font-size: 20px;
    line-height: 23px;
    border-radius: 3px;
    cursor: pointer;
    box-shadow: 0 -2px 0 rgba(0, 0, 0, .15) inset;
    padding: 7px 10px;
}

.amcart-confirm-buttons .button:hover {
    opacity: .8;
}

.amcart-confirm-buttons .checkout {
    display: block;
    padding: 25px 0 8px 0;
    font-size: 16px;
    color: #8b0b04;
    text-decoration: underline;
}

.amcart-confirm-buttons .checkout:hover {
    text-decoration: none;
}

.amcart-confirm-buttons .button:last-child {
    margin-right: 0;
}

.amcart-confirm-buttons .am-btn-left {
    margin-right: var(--am-button-margin);
    border-color: #d1d8e1;
    background-color: #d1d8e1;
    color: #fff;
}

.amcart-confirm-buttons button.am-btn-right,
.amcart-confirm-buttons button.am-btn-left {
    border: 0;
}

.amcart-confirm-buttons .timer {
    display: none;
}

.product-details {
    position: relative;
    bottom: 3px;
}

.am-cart-info {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: black;
    font-weight: bold;
    text-align: center;
}

.added-item {
    color: #8b0b04;
    display: block;
    margin: 33px 15px 5px;
    font-weight: 800;
    font-size: 24px;
    line-height: normal;
    word-break: break-word;
}

.am_price {
    color: #8b0b04;
    font-weight: bold;
}

.mask {
    opacity: .4;
}

#am-a-count {
    color: #8b0b04;
    font-weight: bold;
}

#am-a-count:visited {
    color: #8b0b04;
}

.amcart-message-box .products .product-item-name {
    margin: 0;
}

.amcart-message-box .products .product-item-actions .secondary-addto-links,
.amcart-message-box .products .product-item-actions .actions-primary,
.amcart-message-box .products .product-item-actions .actions-secondary {
    text-align: center;
}

.amcart-message-box .products .product-item-actions .actions-primary,
.amcart-message-box .products .product-item-actions .secondary-addto-links {
    display: block;
    float: none;
    margin: 5px auto;
}

.amcart-message-box .products .product-item-actions .tocart {
    background: var(--am-button-secondary-bg);
    box-shadow: 0 -2px 0 rgba(0, 0, 0, .15) inset;
    border-radius: 3px;
    border: 0;
}

.am-related-box .products .product-item-name {
    margin: 0;
}

.am-related-box .products .product-item-actions .secondary-addto-links,
.am-related-box .products .product-item-actions .actions-primary,
.am-related-box .products .product-item-actions .actions-secondary {
    text-align: center;
}

.am-related-box .products .product-item-actions .actions-primary,
.am-related-box .products .product-item-actions .secondary-addto-links {
    display: block;
    float: none;
    margin: 5px auto 10px;
}

.am-related-box .products .product-item-actions .am-actions-wrapper {
    position: absolute;
    top: calc(-1 * var(--am-actions-secondary-size));
    right: 0;
    margin: 0;
    display: none;
    width: 100%;
    transition: all .2s ease-in-out;
    z-index: 999;
}

.am-related-box .products .product-item-actions .am-actions-wrapper .action {
    width: var(--am-actions-secondary-size);
    height: var(--am-actions-secondary-size);
    background: #f0f0f0;
}

.am-related-box .products .product-item-actions .am-actions-wrapper .action:before {
    line-height: var(--am-actions-secondary-size);
}

.am-related-box .products .product-item-actions .tocart {
    background: var(--am-button-secondary-bg);
    box-shadow: 0 -2px 0 rgba(0, 0, 0, .15) inset;
    border-radius: 3px;
    border: 0;
}

.product-info-main .product-add-form {
    text-align: left;
}

.products.list .swatch-attribute .amcart-error {
    display: none;
}

.am-slider.owl-carousel .owl-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    transform: translateY(-50%);
    pointer-events: none;
}

.am-slider.owl-carousel .owl-prev {
    float: left;
    margin-left: 5px;
    pointer-events: auto;
}

.am-slider.owl-carousel .owl-next {
    float: right;
    margin-right: 5px;
    pointer-events: auto;
}

.am-slider.owl-carousel .owl-nav .disabled {
    opacity: .3;
}

.am-slider.owl-carousel .product-item {
    margin: 0 auto;
}

.am-slider.owl-carousel .product-item-info:hover {
    box-shadow: none;
    border: 0;
    margin: 0;
    padding: 0;
}

.am-slider.arrow {
    width: 18px;
    height: 35px;
    background: var(--am-slider-arrow-bg);
    cursor: pointer;
}

.am-slider.arrow.-left {
    transform: rotate(180deg);
}

.am-photo-container {
    display: flex;
    justify-content: center;
    width: 100%;
}

/* Alignment for the slider items */
.amcart-message-box .owl-stage {
    display: flex;
}

.amcart-message-box .owl-stage .product-item,
.amcart-message-box .owl-stage .product-item-info {
    height: 100%;
}

.amcart-message-box .owl-stage .product-item-info {
    display: flex;
    flex-flow: column;
    justify-content: space-between;
}

.am-related-box .owl-stage {
    display: flex;
    margin: auto;
}

.am-related-box .owl-stage .product-item,
.am-related-box .owl-stage .product-item-info {
    height: 100%;
}

.am-related-box .owl-stage .product-item-info {
    display: flex;
    flex-flow: column;
}

.am-related-title {
    margin: 20px 40px;
    font-size: 15px;
    height: 1px;
    background: #cecccc;
    line-height: 0;
}

.am-related-title > .am-title {
    padding: 0 20px;
}

#amimg-container {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 9999;
}

#amprogress {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100000;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(11, 11, 11, .1) 0%, rgba(11, 11, 11, .6) 100%) repeat-x rgba(11, 11, 11, .2);
}

div.swatch-option-tooltip {
    z-index: 99999;
}

#confirmBox .error {
    margin: 33px 15px 5px;
}

[data-post-ajax] {
    cursor: pointer;
}

/* Override Magento styles */
.amcart-message-box .bundle-options-wrapper {
    margin-top: 25px;
}

.amcart-message-box .bundle-options-wrapper input[type="radio"] {
    width: 15px;
}

.amcart-message-box .bundle-options-wrapper p.required {
    color: #e02b27;
}

.amcart-message-box .bundle-options-wrapper .field.qty > .label {
    display: inline-block;
    margin: 10px 0 8px;
    font-weight: 600;
}

.amcart-message-box .bundle-options-wrapper .input-text.qty {
    text-align: center;
    width: 54px;
}

.amcart-message-box .block-bundle-summary {
    display: none;
}

.page-product-downloadable .amcart-message-box .product-add-form {
    margin-bottom: 0;
}

.page-product-downloadable .amcart-message-box .product-options-bottom,
.page-product-downloadable .amcart-message-box .product-options-wrapper {
    float: none;
    width: auto;
}

.page-product-downloadable .amcart-message-box .box-tocart .field.qty {
    display: block;
    margin-bottom: 6px;
}

/* ==========================================================================
   Tablet +   (Luma's stock @screen__m — confirm this theme didn't override it)
   ========================================================================== */

@media (min-width: 768px) {

    .amcart-message-box,
    .amcart-message-box .related,
    .am-related-box,
    .am-related-box .related {
        width: var(--am-confirmbox-width);
    }

    #confirmBox {
        max-height: 90vh;
    }

    #confirmBox .products-grid .product-item-actions {
        margin-top: 0;
    }

    #confirmOverlay.am-center {
        align-items: center;
        justify-content: center;
    }

    #confirmOverlay.am-right {
        align-items: center;
        justify-content: flex-end;
        padding-right: 230px;
    }

    #confirmOverlay.am-left {
        align-items: center;
        justify-content: flex-start;
        padding-left: 230px;
    }

    #confirmOverlay.am-top-right {
        align-items: flex-start;
        justify-content: flex-end;
        padding: 130px 230px 0 0;
    }

    #confirmOverlay.am-top-left {
        align-items: flex-start;
        justify-content: flex-start;
        padding: 130px 0 0 230px;
    }

    #confirmOverlay.am-top {
        align-items: flex-start;
        justify-content: center;
        padding-top: 130px;
    }

    .amcart-message-box .products .product-item {
        margin: 0;
        width: var(--am-product-item-width);
    }

    .am-related-box .related .products .item.product:hover .am-actions-wrapper {
        top: 0;
    }

    .am-related-box .related .products .product-item {
        margin: 0;
        padding: 0;
        width: var(--am-product-item-width);
    }

    .am-related-box .related .products .product-item-actions .secondary-addto-links {
        display: none;
    }

    .am-related-box .related .products .product-item-actions .secondary-addto-links.am-actions-wrapper {
        display: block;
    }

    .amcart-confirm-buttons .button {
        width: 42%;
    }

    .amcart-confirm-buttons .am-btn-left {
        margin-right: var(--am-button-m-margin);
    }

    .amcart-confirm-buttons .timer {
        display: inline;
    }

    .am-slider.owl-carousel .owl-prev {
        margin-left: 10px;
    }

    .am-slider.owl-carousel .owl-next {
        margin-right: 10px;
    }
}
/* ==========================================================================
   EK: mobile (below 768px) - compact popup matching the Luma one
   (mobile-ajax-cart.PNG): inset card, smaller text, "Qty" label above a small
   stepper, Continue / View Cart side by side, plain "Go to Checkout" link.
   ========================================================================== */

@media (max-width: 767px) {
    #confirmBox {
        width: calc(100% - 32px);
        border-radius: 6px;
    }

    #confirmBox > .cross {
        top: 8px;
        right: 12px;
        font-size: 18px;
    }

    .amcart-message-box {
        min-width: 0;
        margin: 0 auto 8px;
        padding: 0 16px;
    }

    #confirmBox .added-item {
        margin: 28px 8px 4px;
        font-size: 20px;
        line-height: 1.3;
    }

    #confirmBox .amcart-message-box > p.text:first-of-type {
        padding-bottom: 8px;
        font-size: 12px;
    }

    /* Image left, qty block right, with "Qty" on its own line above the stepper */
    #confirmBox .am-photo-container {
        gap: 12px;
    }

    #confirmBox .am-photo-container .product-item-photo img {
        max-width: 140px;
        height: auto;
    }

    #confirmBox .am-photo-container [x-data] > div {
        flex-wrap: wrap;
        margin-right: 0;
    }

    #confirmBox .am-photo-container [x-data] label {
        flex-basis: 100%;
        margin: 0 0 6px;
        text-align: left;
        font-size: 12px;
        font-weight: 700;
    }

    #confirmBox .am-photo-container [x-data] button {
        width: 22px;
        height: 22px;
        padding: 0;
        background: #c4c4c4;
        color: #fff;
        font-size: 14px;
        line-height: 22px;
    }

    #confirmBox .am-photo-container [x-data] input[name="qty"] {
        width: 30px;
        height: 26px;
        margin: 0 4px;
        padding: 0 2px;
        border: 1px solid #ccc;
        font-size: 12px;
    }

    #confirmBox .amcart-count,
    #confirmBox .amcart-subtotal {
        margin: 0;
        font-size: 12px;
        line-height: 1.5;
    }

    #confirmBox .amcart-count {
        margin-top: 4px;
    }

    .amcart-confirm-buttons {
        flex-wrap: wrap;
        justify-content: space-between;
        margin: 16px 16px 0;
    }

    .amcart-confirm-buttons .button {
        width: calc(50% - 6px);
        height: 42px;
        margin: 0 !important;
        padding: 0 8px;
        font-size: 17px;
        line-height: 42px;
        border-radius: 2px;
    }

    .amcart-confirm-buttons .am-btn-left {
        border-color: #bfbfbf;
        background-color: #bfbfbf;
    }

    .amcart-confirm-buttons .checkout {
        flex-basis: 100%;
        padding: 18px 0 16px;
        font-size: 13px;
        text-decoration: none;
    }

    .amcart-confirm-buttons .checkout:hover {
        text-decoration: underline;
    }

    #confirmBox .am-related-box:empty {
        display: none;
    }
}
