/**
 * @author [Webdojo] - Toast Notifica Carrello WooCommerce
 * Stile: scuro elegante, posizione in alto a destra
 *
 * @package hello-child
 * @since   3.5.8
 */

/* ==========================================================================
   1. SOPPRIMI SOLO LA NOTICE "AGGIUNTO AL CARRELLO" (non altri tipi di info)
   La soppressione principale avviene via PHP: questa è una sicurezza extra.
   ========================================================================== */

.woocommerce-notices-wrapper > .woocommerce-message {
    display: none !important;
}

/* ==========================================================================
   2. TOAST CONTAINER
   ========================================================================== */

.wd-cart-toast {
    /* Posizionamento */
    position: fixed;
    top: 90px;
    right: 20px;
    z-index: 99999;

    /* Layout */
    display: flex;
    align-items: center;
    gap: 12px;
    width: 340px;
    max-width: calc(100vw - 40px);
    padding: 14px 16px;
    box-sizing: border-box;

    /* Design scuro */
    background-color: #1c1c1c;
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.55), 0 2px 8px rgba(0, 0, 0, 0.3);
    border-top: 2px solid #f59100;

    /* Animazione: stato iniziale (nascosto) */
    opacity: 0;
    transform: translateY(-16px);
    transition: opacity 0.35s ease, transform 0.35s ease;

    /* Testo */
    font-family: inherit;
    color: #ffffff;
}

/* Stato visibile (aggiunto via JS) */
.wd-cart-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   3. THUMBNAIL IMMAGINE PRODOTTO (opzionale)
   ========================================================================== */

.wd-cart-toast__thumb {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 6px;
    overflow: hidden;
    background-color: #2a2a2a;
}

.wd-cart-toast__thumb img.wd-cart-toast__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ==========================================================================
   4. ICONA CHECK
   ========================================================================== */

.wd-cart-toast__check {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: #f59100;
    color: #000;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* ==========================================================================
   5. CORPO DEL TESTO
   ========================================================================== */

.wd-cart-toast__body {
    flex: 1;
    min-width: 0; /* consente il troncamento del testo */
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.wd-cart-toast__label {
    display: block;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #f59100;
    line-height: 1.2;
}

.wd-cart-toast__name {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ==========================================================================
   6. PULSANTE CTA "CARRELLO →"
   ========================================================================== */

.wd-cart-toast__cta {
    flex-shrink: 0;
    display: inline-block;
    padding: 7px 12px;
    border: 1px solid #f59100;
    border-radius: 5px;
    background-color: transparent;
    color: #f59100;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.2s ease, color 0.2s ease;
    line-height: 1;
}

.wd-cart-toast__cta:hover,
.wd-cart-toast__cta:focus {
    background-color: #f59100;
    color: #000000;
    text-decoration: none;
    outline: none;
}

/* ==========================================================================
   7. PULSANTE CHIUDI ×
   ========================================================================== */

.wd-cart-toast__close {
    flex-shrink: 0;
    appearance: none;
    -webkit-appearance: none;
    background: none;
    border: none;
    padding: 4px;
    margin: 0;
    cursor: pointer;
    color: #888;
    font-size: 18px;
    line-height: 1;
    border-radius: 3px;
    transition: color 0.2s ease;
    align-self: flex-start;
}

.wd-cart-toast__close:hover,
.wd-cart-toast__close:focus {
    color: #ffffff;
    background-color: transparent;
    outline: none;
}

/* ==========================================================================
   8. RESPONSIVE — MOBILE
   ========================================================================== */

@media (max-width: 480px) {
    .wd-cart-toast {
        top: auto;
        bottom: 20px;
        right: 12px;
        left: 12px;
        width: auto;
        max-width: 100%;
    }
}
