/* Dflex Woo Theme — Toast Notifications Styles */
#dflex-toast-container {
    position: fixed;
    z-index: 9999999;
    pointer-events: none;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Positions */
.dflex-toast-top-right {
    top: 0;
    right: 0;
}

.dflex-toast-top-left {
    top: 0;
    left: 0;
}

.dflex-toast-top-center {
    top: 0;
    left: 50%;
    transform: translateX(-50%);
}

.dflex-toast-bottom-right {
    bottom: 0;
    right: 0;
    flex-direction: column-reverse !important;
}

.dflex-toast-bottom-left {
    bottom: 0;
    left: 0;
    flex-direction: column-reverse !important;
}

.dflex-toast-bottom-center {
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    flex-direction: column-reverse !important;
}

.dflex-toast {
    background: #fff;
    color: #1a1a1a;
    width: 320px;
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    display: flex;
    align-items: center;
    gap: 15px;
    pointer-events: auto;
    position: relative;
    overflow: hidden;
    animation: dflexToastSlideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.2);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.dflex-toast.dflex-toast-dark {
    background: #1a1a1a;
    color: #fff;
    border: none;
}

@keyframes dflexToastSlideIn {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.dflex-toast.hiding {
    animation: dflexToastSlideOut 0.4s ease forwards;
}

@keyframes dflexToastSlideOut {
    to {
        opacity: 0;
        transform: translateX(50px);
    }
}

.dflex-toast-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.dflex-toast-success .dflex-toast-icon {
    color: var(--dflex-color-success, #4CAF50);
}

.dflex-toast-error .dflex-toast-icon {
    color: #E53935;
}

.dflex-toast-info .dflex-toast-icon {
    color: #2196F3;
}

.dflex-toast-content {
    flex-grow: 1;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    text-transform: none !important;
}

.dflex-toast-close {
    font-size: 18px;
    color: #999;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    margin-left: 5px;
}

.dflex-toast-close:hover {
    color: #333;
}

/* Progress Bar */
.dflex-toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    background: rgba(0, 0, 0, 0.05);
    width: 100%;
    z-index: 10;
}

.dflex-toast-dark .dflex-toast-progress {
    background: rgba(255, 255, 255, 0.1);
}

.dflex-toast-success .dflex-toast-progress-fill {
    background: var(--dflex-color-success, #4CAF50);
}

.dflex-toast-error .dflex-toast-progress-fill {
    background: #E53935;
}

.dflex-toast-info .dflex-toast-progress-fill {
    background: #2196F3;
}

.dflex-toast-progress-fill {
    height: 100%;
    width: 0%;
    transition: width linear;
}

/* Success Card with Image (Add to Cart) */
.dflex-toast-product {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dflex-toast-product-img {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: contain;
}

.dflex-toast-product-info {
    flex-grow: 1;
}

.dflex-toast-product-name {
    font-weight: 600;
    margin-bottom: 2px;
}

.dflex-toast-action {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #E53935;
    text-transform: uppercase;
    text-decoration: none;
    margin-top: 4px;
}

/* Hide standard WooCommerce notices when toast module replaces them */
body.dflex-hide-wc-notices .woocommerce-message,
body.dflex-hide-wc-notices .woocommerce-error,
body.dflex-hide-wc-notices .woocommerce-info {
    display: none !important;
}