/* 574-wishlist-css.php */
/* [Wishlist] CSS — the plugin's base rules (Wishlist for WooCommerce 3.6.0,
   assets/css/frontend.css) that our wishlist CSS was built on: same selectors,
   same strength, printed before everything else (@priority 1), so 131 / 142 /
   148 / 149 / 150 / 359 override them exactly as they overrode the plugin's
   file. While the plugin is still active they repeat its own rules (no change).
   The icon shapes below only apply with our wishlist (body.mm-wl-on, 572). */

/* Company colours used by this file's new rules (one place; site copy = edit here). */
:root {
    --mm-wl-toast-bg: #1a1a2e;  /* footer dark */
    --mm-wl-toast-ink: #ffffff;
    --mm-wl-btn-ink: #0e4884;   /* wishlist card Add to cart: brand blue outline */
    --mm-wl-btn-hover: #eef3fa;
    --mm-wl-oos-bg: #e5e7eb;
    --mm-wl-oos-ink: #6b7280;
    --mm-wl-x-ink: #6b7280;     /* the card's × (same as 142 / 148), red on hover */
    --mm-wl-x-hover: #dc2626;
}

.alg-wc-wl-view-state { display: none; position: relative; z-index: 2; }
.alg-wc-wl-btn { position: relative; outline: none; cursor: pointer; }
.alg-wc-wl-btn:focus-visible { outline: 2px solid var(--mm-brand); outline-offset: 2px; }
.alg-wc-wl-btn:hover .alg-wc-wl-view-state i { transform: translateZ(0) scale(1.5, 1.5); }
.alg-wc-wl-btn i { transition: all 0.14s ease-in-out; backface-visibility: hidden; }
.alg-wc-wl-btn .loading { position: relative; font-size: 18px; opacity: 0; display: none; color: #333; }
.alg-wc-wl-btn.loading .loading { opacity: 0.5; display: inline-block; }
.alg-wc-wl-btn.add .alg-wc-wl-view-state-add { display: inline-block; }
.alg-wc-wl-btn.add i { opacity: 0.7; }
.alg-wc-wl-btn.remove .alg-wc-wl-view-state-remove { display: inline-block; }
.alg-wc-wl-btn.remove i { opacity: 1; }
.alg-wc-wl-remove-item-from-wl { margin: 0; }
.alg-wc-wl-thumb-btn-abs { padding: 0; top: 13px; left: 13px; position: absolute; font-size: 0; z-index: 80; }
.alg-wc-wl-thumb-btn-abs div i { font-size: 20px; margin: 0; }
.alg-wc-wl-thumb-btn-single,
.alg-wc-wl-thumb-btn-loop { position: absolute !important; }
.wc-block-product-template .wc-block-product { position: relative; }
.alg-wc-wl-view-table { width: 100%; }
.alg-wc-wl-view-table .product-thumbnail img { max-width: 70px; margin: 0 auto; height: auto; }
.alg-wc-wl-view-table td,
.alg-wc-wl-view-table tr { vertical-align: middle !important; text-align: center !important; }
.alg-wc-wl-view-table th { text-align: center; }
.alg-wc-wl-view-table td { padding: 15px; }
.alg-wc-wl-empty-wishlist { display: none; }
.alg-wc-wl-responsive .alg-wc-wl-view-table .product-thumbnail img { display: inline-block; }
.alg-wc-wl-responsive .alg-wc-wl-view-table td { text-align: right !important; }
.alg-wc-wl-responsive .alg-wc-wl-view-table thead { display: none; }
.alg-wc-wl-responsive .alg-wc-wl-view-table tr { display: block; }
.alg-wc-wl-responsive .alg-wc-wl-view-table tr td { display: block; text-align: right !important; float: left; width: 100%; }
.alg-wc-wl-responsive .alg-wc-wl-view-table tr td:before { content: attr(data-title) ": "; font-weight: 600; float: left; }
.ajax-loading { position: relative; min-height: 80px; }
.ajax-loading::before { background: #fff; width: 100%; height: 100%; position: absolute; left: 0; top: 0; opacity: 0.5; content: " "; display: block; z-index: 999; }
.alg-wc-wl-view-table-container .ajax-loading-icon { display: none; }
.alg-wc-wl-view-table-container .added_to_cart.wc-forward { display: none; }
.alg-wc-delete-wishlist { width: 100%; margin-top: 20px; text-align: right; }

/* "Remove" (circle with an x) and the spinner as shapes: no Font Awesome once the plugin is gone. */
body.mm-wl-on i.fa-times-circle,
body.mm-wl-on i.fa-circle-xmark {
    display: inline-block;
    width: 1em;
    height: 1em;
    background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><path d='M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM175 175c9.4-9.4 24.6-9.4 33.9 0l47 47 47-47c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-47 47 47 47c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-47-47-47 47c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l47-47-47-47c-9.4-9.4-9.4-24.6 0-33.9z'/></svg>") center / contain no-repeat;
    mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><path d='M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM175 175c9.4-9.4 24.6-9.4 33.9 0l47 47 47-47c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-47 47 47 47c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-47-47-47 47c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l47-47-47-47c-9.4-9.4-9.4-24.6 0-33.9z'/></svg>") center / contain no-repeat;
}
body.mm-wl-on i.fa-times-circle::before,
body.mm-wl-on i.fa-circle-xmark::before { content: none !important; }
body.mm-wl-on i.fa-2x { font-size: 2em; }

/* Logged-in save that failed (573): one short message at the bottom, 4.5 s. */
.mm-wl-toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    z-index: 100000;
    max-width: calc(100vw - 32px);
    box-sizing: border-box;
    padding: 12px 18px;
    border-radius: 8px;
    background: var(--mm-wl-toast-bg);
    color: var(--mm-wl-toast-ink);
    font-size: 14px;
    line-height: 1.4;
    text-align: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .25);
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, 8px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
.mm-wl-toast.is-on {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

/* The list as category cards (572, 23 Oct): the card itself is the category card (its CSS
   reaches it through #DPRODCAT); only the wishlist's own two extras are styled here.
   The × at the card's top right (its round look: 142 / 148's .product-removal rules). */
#DPRODCAT.mm-wl-grid li.mm-wl-card { position: relative; display: flex; flex-direction: column; }
#DPRODCAT.mm-wl-grid .mm-wl-card-x { position: absolute; top: 10px; right: 10px; z-index: 6; margin: 0; padding: 0; }
/* the card's heart rules (131: #DPRODCAT .alg-wc-wl-btn placed at the corner, gold icon when "on") also match the ×:
   the × keeps its own place (the box above) and its grey / red icon (142 / 148) */
#DPRODCAT.mm-wl-grid li.mm-wl-card .mm-wl-card-x .alg-wc-wl-btn { position: relative !important; top: auto !important; right: auto !important; bottom: auto !important; left: auto !important; margin: 0 !important; width: 28px !important; height: 28px !important; }
#DPRODCAT.mm-wl-grid li.mm-wl-card .mm-wl-card-x .alg-wc-wl-btn i { color: var(--mm-wl-x-ink) !important; }
#DPRODCAT.mm-wl-grid li.mm-wl-card .mm-wl-card-x .alg-wc-wl-btn:hover i { color: var(--mm-wl-x-hover) !important; }
#DPRODCAT.mm-wl-grid .mm-wl-card-atc { margin-top: auto; padding: 0 14px 14px; }
#DPRODCAT.mm-wl-grid .mm-wl-card-atc p { margin: 0; padding: 0; }
/* the category cards hide WooCommerce's Add to cart (146: display none !important); the wishlist card shows it */
#DPRODCAT.mm-wl-grid li.mm-wl-card .mm-wl-card-atc .button,
#DPRODCAT.mm-wl-grid li.mm-wl-card .mm-wl-card-atc .add_to_cart_button { display: block !important; }
#DPRODCAT.mm-wl-grid .mm-wl-card-atc .button {
    display: block;
    width: 100%;
    box-sizing: border-box;
    height: 36px;
    line-height: 34px;
    padding: 0;
    border: 1px solid var(--mm-wl-btn-ink);
    border-radius: 8px;
    background: #ffffff;
    color: var(--mm-wl-btn-ink);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-align: center;
    text-decoration: none;
    transition: background-color 0.15s ease;
}
#DPRODCAT.mm-wl-grid .mm-wl-card-atc .button:hover { background: var(--mm-wl-btn-hover); }
#DPRODCAT.mm-wl-grid .mm-wl-card-atc .mm-wl-card-oos,
#DPRODCAT.mm-wl-grid .mm-wl-card-atc .mm-wl-card-oos:hover { background: var(--mm-wl-oos-bg); border-color: var(--mm-wl-oos-bg); color: var(--mm-wl-oos-ink); cursor: not-allowed; }
/* Same card size as the category pages: there the grid shares the row with the 260 px filter column (4 cards at
   1280 px); the wishlist has no filter column, so one card more per row keeps the photo the same size. */
@media (min-width: 1100px) {
    #DPRODCAT.mm-wl-grid .wc-block-product-template { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; }
}
@media (max-width: 768px) {
    #DPRODCAT.mm-wl-grid .mm-wl-card-x { top: 8px; right: 8px; }
    #DPRODCAT.mm-wl-grid li.mm-wl-card .mm-wl-card-x .alg-wc-wl-btn { width: 32px !important; height: 32px !important; } /* tap target */
    #DPRODCAT.mm-wl-grid .mm-wl-card-atc { padding: 0 10px 10px; }
    #DPRODCAT.mm-wl-grid .mm-wl-card-atc .button { height: 32px; line-height: 30px; font-size: 12px; }
}

