/* ============================================================
   ICT WooCommerce Wishlist — Styles
   Inherits theme colours via CSS custom properties.
   https://ict.com.tn/
   ============================================================ */

/* ─── Bouton favori (dans .product-loop-meta) ────────────────────────────── */

.ict-wishlist-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    transition: transform 0.2s ease;
    line-height: 1;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    vertical-align: middle;
    margin-bottom: 6px;
}

.ict-wishlist-btn svg {
    width: 20px;
    height: 20px;
    fill: transparent;
    stroke: var(--e-global-color-woostify_color_3, var(--woostify-theme-color, var(--color-primary, #96588a)));
    stroke-width: 1.8;
    transition: fill 0.2s ease, stroke 0.2s ease;
    pointer-events: none;
}

.ict-wishlist-btn:hover {
    transform: scale(1.15);
}

/* État actif : cœur plein avec --e-global-color-woostify_color_3 (Elementor/Woostify) */
.ict-wishlist-btn.ict-active svg {
    fill: var(--e-global-color-woostify_color_3, var(--woostify-theme-color, var(--color-primary, #96588a)));
    stroke: var(--e-global-color-woostify_color_3, var(--woostify-theme-color, var(--color-primary, #96588a)));
}

/* Animation heartbeat au clic */
.ict-wishlist-btn.ict-beat {
    animation: ict-heartbeat 0.4s ease forwards;
}

@keyframes ict-heartbeat {
    0% {
        transform: scale(1);
    }

    35% {
        transform: scale(1.4);
    }

    70% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

.ict-wishlist-btn.ict-loading {
    opacity: 0.5;
    pointer-events: none;
}

/* ─── Toast SweetAlert2 ──────────────────────────────────────────────────── */

/* Force position bottom-right and z-index above theme layers */
.swal2-container.swal2-bottom-end {
    position: fixed !important;
    bottom: 20px !important;
    right: 20px !important;
    top: auto !important;
    left: auto !important;
    z-index: 999999 !important;
}

.ict-swal-toast {
    padding: 14px 18px !important;
    font-family: inherit !important;
}

.ict-toast-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
}

.ict-toast-msg {
    margin: 0;
    font-size: .9em;
    font-weight: 600;
    color: inherit;
    line-height: 1.4;
}

.ict-toast-link {
    display: inline-block;
    font-size: .82em;
    font-weight: 600;
    color: var(--e-global-color-woostify_color_3, var(--woostify-theme-color, var(--color-primary, #96588a)));
    text-decoration: underline;
    transition: opacity .15s;
}

.ict-toast-link:hover {
    opacity: .75;
}

/* ─── Page Wishlist — utilise le grid WooCommerce natif ─────────────────── */
/* Pas de CSS custom pour la grille : woocommerce_product_loop_start/end
   et wc_get_template_part('content','product') appliquent déjà les classes
   ul.products et li.product du thème. */

.ict-wishlist-page .woocommerce-info {
    margin-bottom: 1em;
}

/* ── Remove button on the wishlist page (Trash Icon) ──────────────────── */

.ict-wishlist-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    padding: 4px;
    color: var(--e-global-color-woostify_color_3, var(--woostify-theme-color, #96588a));
    transition: transform 0.2s ease, color 0.2s ease, opacity 0.2s ease;
    line-height: 1;
    margin-bottom: 6px;
    vertical-align: middle;
}

.ict-wishlist-remove svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    pointer-events: none;
    stroke: var(--e-global-color-woostify_color_3, var(--woostify-theme-color, #96588a));
}

.ict-wishlist-remove:hover {
    transform: scale(1.15);
}

.ict-wishlist-remove:hover svg {
    stroke: #d9534f; /* Red on hover for trash icon */
}

.ict-wishlist-remove:disabled,
.ict-wishlist-remove.ict-loading {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

/* ─── Single Product Page — titre + bouton inline ───────────────────────── */

.ict-title-wishlist-wrap {
    display: flex;
    align-items: center;
    gap: .4em;
    flex-wrap: wrap;
}

.ict-title-wishlist-wrap .product_title {
    margin-bottom: 0;
    flex: 1 1 auto;
}

.ict-wishlist-btn--single {
    flex-shrink: 0;
    margin-bottom: 0;
    padding: 6px;
}

.ict-wishlist-btn--single svg {
    width: 26px;
    height: 26px;
}

/* ─── Responsive ─────────────────────────────────────────────────────────── */

@media (max-width: 480px) {
    .ict-swal-toast {
        width: calc(100vw - 24px) !important;
    }
}

nav.trp-language-switcher.trp-floating-switcher.trp-ls-dropdown.trp-switcher-position-bottom {
    z-index: 10 !important;
}
