/* Buying flow (MagicTech): white close button on the pop-ups, Buy-now button in the quick pop-up, and the "added to cart" sheet.
   Loaded automatically (gamer-x-*.css). Rollback: delete this file and gamer-x-cart.js. */

/* ---- close button of the quick-view / quick-shop pop-ups: white, bigger tap target ---- */
html body .custom-modal .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
    opacity: 1;
    width: 40px;
    height: 40px;
    padding: 0;
    background-size: 14px;
    background-color: rgba(255, 255, 255, .10);
    border-radius: 50%;
    z-index: 5;
}
html body .custom-modal .btn-close:hover,
html body .custom-modal .btn-close:focus {
    background-color: rgba(255, 255, 255, .22);
    opacity: 1;
    box-shadow: none;
}

/* ---- buttons inside the pop-ups: Buy now (red, first) and Add to cart (outline) ---- */
html body .custom-modal .product-extra-link2 {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}
html body .custom-modal .product-extra-link2 .button {
    width: 100%;
    margin: 0 !important;
    justify-content: center;
}
html body .custom-modal .product-extra-link2 .button-buy-now {
    order: 1;
}
html body .custom-modal .product-extra-link2 .button-add-to-cart {
    order: 2;
}
html body .custom-modal .product-extra-link2.gx-has-buy .button-add-to-cart {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .55);
    box-shadow: none;
}
html body .custom-modal .product-extra-link2.gx-has-buy .button-add-to-cart:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, .08);
}
html body .custom-modal .product-extra-link2.gx-has-buy .button-buy-now {
    background: var(--gm-acc, #ff3d2e);
    color: #fff;
    border: 1px solid var(--gm-acc, #ff3d2e);
}

/* ---- "added to cart" sheet ---- */
#gx-sheet-back {
    position: fixed;
    inset: 0;
    z-index: 100000;
    background: rgba(0, 0, 0, .62);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    transition: opacity .18s ease;
}
#gx-sheet-back.gx-on {
    opacity: 1;
}
#gx-sheet {
    width: 100%;
    max-width: 480px;
    box-sizing: border-box;
    background: #12131a;
    color: #fff;
    border: 1px solid #2a2b36;
    border-bottom: 0;
    border-radius: 16px 16px 0 0;
    padding: 18px 18px calc(18px + env(safe-area-inset-bottom, 0px));
    transform: translateY(40px);
    transition: transform .2s ease;
    direction: rtl;
    text-align: start;
    font-family: inherit;
}
#gx-sheet-back.gx-on #gx-sheet {
    transform: none;
}
#gx-sheet .gx-head {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 19px;
    font-weight: 800;
    margin-bottom: 14px;
}
#gx-sheet .gx-check {
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #1fb36b;
    display: grid;
    place-items: center;
}
#gx-sheet .gx-check svg {
    width: 17px;
    height: 17px;
    stroke: #fff;
}
#gx-sheet .gx-x {
    margin-inline-start: auto;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .10);
    color: #fff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}
#gx-sheet .gx-item {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border: 1px solid #2a2b36;
    border-radius: 10px;
    background: #181a23;
    margin-bottom: 12px;
}
#gx-sheet .gx-item img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    flex: 0 0 auto;
    border-radius: 8px;
    background: #0e0f14;
}
#gx-sheet .gx-name {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
#gx-sheet .gx-sub {
    margin-top: 4px;
    color: #a9acb8;
    font-size: 13px;
}
#gx-sheet .gx-total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin: 4px 2px 14px;
    color: #c9ccd8;
    font-size: 14px;
}
#gx-sheet .gx-total b {
    color: #fff;
    font-size: 20px;
}
#gx-sheet .gx-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
    min-height: 50px;
    padding: 0 16px;
    border: 1px solid transparent;
    font-size: 17px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    color: #fff;
    clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
}
#gx-sheet .gx-btn-main {
    background: var(--gm-acc, #ff3d2e);
}
#gx-sheet .gx-row {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}
#gx-sheet .gx-row .gx-btn {
    min-height: 46px;
    font-size: 15px;
    font-weight: 700;
    background: #1f212c;
    border-color: #3a3c4a;
}
@media (min-width: 768px) {
    #gx-sheet-back {
        align-items: center;
    }
    #gx-sheet {
        border-radius: 14px;
        border-bottom: 1px solid #2a2b36;
    }
}
@media (prefers-reduced-motion: reduce) {
    #gx-sheet-back,
    #gx-sheet {
        transition: none;
    }
}

/* the theme's green toast says the same as the sheet and would cover its buttons */
body.gx-quiet-toast #toast-container,
body.gx-quiet-toast .toast-container,
body.gx-quiet-toast .toastify,
body.gx-quiet-toast .toast,
body.gx-sheet-open #toast-container,
body.gx-sheet-open .toast-container,
body.gx-sheet-open .toastify,
body.gx-sheet-open .toast {
    display: none !important;
}
