/* ============================================================
   CF Toast — sistema unificado de notificaciones del plugin
   Reemplaza alert() del navegador y los avisos nativos de
   WooCommerce (.woocommerce-message / -error / -info).
   ============================================================ */

.cf-toast-stack {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
    max-width: calc(100vw - 48px);
}

.cf-toast {
    pointer-events: auto;
    min-width: 280px;
    max-width: 420px;
    background: #FFFFFF;
    color: #1a1a1a;
    border-left: 4px solid #2D7A4F;
    border-radius: 10px;
    padding: 14px 16px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.14), 0 2px 6px rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 14px;
    line-height: 1.45;
    transform: translateX(120%);
    opacity: 0;
    transition: transform 240ms cubic-bezier(0.4, 0, 0.2, 1), opacity 240ms ease;
    box-sizing: border-box;
}

.cf-toast.is-visible {
    transform: translateX(0);
    opacity: 1;
}

.cf-toast.is-leaving {
    transform: translateX(120%);
    opacity: 0;
}

/* Variantes por tipo */
.cf-toast--success { border-left-color: #2D7A4F; }
.cf-toast--error   { border-left-color: #B33A3A; }
.cf-toast--info    { border-left-color: #C9A96E; }
.cf-toast--warning { border-left-color: #C97E1F; }

.cf-toast__icon {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
}

.cf-toast--success .cf-toast__icon { color: #2D7A4F; }
.cf-toast--error   .cf-toast__icon { color: #B33A3A; }
.cf-toast--info    .cf-toast__icon { color: #C9A96E; }
.cf-toast--warning .cf-toast__icon { color: #C97E1F; }

.cf-toast__icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.cf-toast__text {
    flex: 1;
    word-break: break-word;
    font-weight: 500;
    color: #1a1a1a;
}

.cf-toast__close {
    flex-shrink: 0;
    background: transparent;
    border: 0;
    cursor: pointer;
    color: #999999;
    font-size: 22px;
    line-height: 1;
    padding: 0;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: color 150ms ease, background-color 150ms ease;
    margin-top: -1px;
}

.cf-toast__close:hover,
.cf-toast__close:focus-visible {
    color: #1a1a1a;
    background-color: #f1f1f1;
    outline: none;
}

/* Móvil: el stack baja al fondo y los toasts ocupan todo el ancho */
@media (max-width: 600px) {
    .cf-toast-stack {
        top: auto;
        bottom: 16px;
        right: 16px;
        left: 16px;
        max-width: none;
    }
    .cf-toast {
        min-width: 0;
        max-width: none;
        width: 100%;
        font-size: 13.5px;
        padding: 12px 14px;
    }
}
