/*
 Theme Name:   Bricks Child Theme
 Theme URI:    https://bricksbuilder.io/
 Description:  Use this child theme to extend Bricks.
 Author:       Bricks
 Author URI:   https://bricksbuilder.io/
 Template:     bricks
 Version:      1.0
 Text Domain:  bricks
*/

/* ---- Contenedor de toasts ---- */
#woo-toast-container {
    position: fixed !important;
    bottom: 24px !important;
    right: 24px !important;
    z-index: 99999 !important;
    width: 340px !important;
    display: flex !important;
    flex-direction: column-reverse !important;
    gap: 10px !important;
    pointer-events: none !important;
}

#woo-toast-container .woo-toast {
    pointer-events: all !important;
}

@media (max-width: 480px) {
    #woo-toast-container {
        bottom: 0 !important;
        right: 0 !important;
        left: 0 !important;
        width: 100% !important;
        padding: 0 12px 12px !important;
    }
}

/* ---- Toast base ---- */
.woo-toast {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 10px;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08), 0 1px 4px rgba(0, 0, 0, 0.04);
    animation: wooToastIn 0.28s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    position: relative;
    overflow: hidden;
}

.woo-toast.is-removing {
    animation: wooToastOut 0.22s ease-in forwards;
}

@keyframes wooToastIn {
    from {
        opacity: 0;
        transform: translateX(18px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes wooToastOut {
    from {
        opacity: 1;
        transform: translateX(0) scale(1);
        max-height: 120px;
    }
    to {
        opacity: 0;
        transform: translateX(16px) scale(0.96);
        max-height: 0;
        padding-top: 0;
        padding-bottom: 0;
        margin-bottom: -10px;
    }
}

/* Barra de progreso */
.woo-toast::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    border-radius: 0 0 0 10px;
    animation: wooToastProgress var(--woo-toast-duration, 4500ms) linear forwards;
}

@keyframes wooToastProgress {
    from { width: 100%; }
    to   { width: 0%; }
}

/* ---- Icono ---- */
.woo-toast__icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
    margin-top: 1px;
}

/* ---- Contenido ---- */
.woo-toast__body {
    flex: 1;
    min-width: 0;
}

.woo-toast__title {
    font-size: 13.5px;
    font-weight: 600;
    color: #111111;
    margin: 0 0 2px;
    line-height: 1.4;
}

.woo-toast__message {
    font-size: 12.5px;
    color: #666666;
    margin: 0;
    line-height: 1.5;
}

.woo-toast__message a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ---- Botón cerrar ---- */
.woo-toast__close {
    background: none;
    border: none;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #999999;
    border-radius: 4px;
    flex-shrink: 0;
    font-size: 18px;
    line-height: 1;
    transition: color 0.15s, background 0.15s;
    margin-top: 2px;
}

.woo-toast__close:hover {
    color: #111111;
    background: rgba(0, 0, 0, 0.06);
}

/* ---- Variantes ---- */
.woo-toast--cart .woo-toast__icon {
    background: #eeedfe;
    color: #3c3489;
}
.woo-toast--cart::after { background: #7f77dd; }

.woo-toast--success .woo-toast__icon {
    background: #eaf3de;
    color: #3b6d11;
}
.woo-toast--success::after { background: #639922; }

.woo-toast--error .woo-toast__icon {
    background: #fcebeb;
    color: #a32d2d;
}
.woo-toast--error::after { background: #e24b4a; }

.woo-toast--info .woo-toast__icon {
    background: #e6f1fb;
    color: #185fa5;
}
.woo-toast--info::after { background: #378add; }

.woo-toast--warning .woo-toast__icon {
    background: #faeeda;
    color: #854f0b;
}
.woo-toast--warning::after { background: #ba7517; }