/**
 * TP Wishlist Print — Styles frontend
 */

.tp-wishlist-print-wrap {
    margin-top: 10px;
    text-align: right;
}

/* Bouton texte — couleurs calquées sur theme.css de TI Wishlist */
.tp-wishlist-print-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45em;
    padding: 0.5em 1.1em;
    background: #ebe9eb;
    color: #000000;
    border-radius: 3px;
    text-decoration: none;
    font-size: 0.9em;
    line-height: 1.4;
    cursor: pointer;
    transition: background 0.2s;
}

.tp-wishlist-print-btn:hover,
.tp-wishlist-print-btn:focus {
    background: #dad8da;
    color: #000000;
    text-decoration: none;
}

.tp-wishlist-print-btn svg {
    width: 1em;
    height: 1em;
    fill: currentColor;
    flex-shrink: 0;
}

/* -----------------------------------------------------------------------
   2. STYLES D'IMPRESSION @media print
   On masque tout ce qui n'est pas la wishlist elle-même.
   Les sélecteurs sont suffisamment spécifiques pour cibler Astra + WooCommerce
   sans risquer d'impacter d'autres impressions du site.
   ----------------------------------------------------------------------- */

@media print {

    /* --- Éléments à masquer --- */
    header,
    .site-header,
    #masthead,
    .ast-masthead-custom-menu,
    footer,
    .site-footer,
    #colophon,
    nav,
    .site-navigation,
    .ast-breadcrumbs-wrapper,
    .woocommerce-breadcrumb,
    .widget_area,
    .sidebar,
    #secondary,
    .woocommerce-notices-wrapper,
    .wc-block-components-notices,
    /* Boutons d'action de la wishlist (Ajouter au panier, supprimer…) */
    .tinvwl-btn,
    .tinv-wishlist-clear,
    td.product-add-to-cart,
    td.product-remove,
    /* Section partage (inutile à l'impression) */
    .social-buttons,
    /* Bannières, popups, back-to-top, etc. */
    .ast-scroll-to-top,
    .pum-overlay,
    #wpadminbar {
        display: none !important;
    }

    /* --- Mise en page pour l'impression --- */
    body,
    .site-content,
    .content-area,
    #primary {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        float: none !important;
    }

    /* Tableau de la wishlist : pleine largeur, lisible */
    .tinv-wishlist table {
        width: 100% !important;
        border-collapse: collapse;
    }

    .tinv-wishlist table th,
    .tinv-wishlist table td {
        border: 1px solid #ccc;
        padding: 6px 8px;
        font-size: 11pt;
        color: #000;
    }

    /* Images produits : taille raisonnable */
    .tinv-wishlist .product-thumbnail img {
        max-width: 60px !important;
        height: auto !important;
    }

    /* Liens : afficher l'URL entre parenthèses sauf pour les actions internes */
    a[href]:not([href^="#"])::after {
        content: none; /* on évite d'afficher les URLs — trop verbeux pour une liste */
    }

    /* Assurer la visibilité du titre de la wishlist */
    .tinv-wishlist .tinvwl-wishlist-name,
    h1, h2 {
        color: #000 !important;
        font-size: 16pt;
    }
}

/** Override des boutons de partage */

.tinv-wishlist .social-buttons li a.social {
    width: 1.5em;
    height: 2em;
    font-size: 35px;
}

.tinv-wishlist .social-buttons li a.social:hover {
    color: #000;
}
