/**
 * Xi Woo Templates - Toast Notifications CSS
 */

/* Toast Container */
.xi-toast-container {
    position: fixed;
    z-index: 10000;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 400px;
    width: 100%;
}

/* Container Positions */
.xi-toast-top-right {
    top: 20px;
    right: 20px;
}

.xi-toast-top-left {
    top: 20px;
    left: 20px;
}

.xi-toast-top-center {
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
}

.xi-toast-bottom-right {
    bottom: 20px;
    right: 20px;
}

.xi-toast-bottom-left {
    bottom: 20px;
    left: 20px;
}

.xi-toast-bottom-center {
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
}

/* Toast Base Styles */
.xi-toast {
    pointer-events: auto;
    background: #4CAF50;
    color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 16px 20px;
    position: relative;
    max-width: 100%;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    line-height: 1.4;
}

.xi-toast.xi-toast-show {
    opacity: 1;
    transform: translateX(0);
}

.xi-toast.xi-toast-hide {
    opacity: 0;
    transform: translateX(100%);
}

/* Toast Content */
.xi-toast-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.xi-toast-message {
    font-weight: 500;
    margin: 0;
}

/* Cart Button */
.xi-toast-cart-button {
    background: transparent;
    border: 1px solid currentColor;
    color: inherit;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.xi-toast-cart-button:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

/* Close Button */
.xi-toast-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: opacity 0.2s ease;
    flex-shrink: 0;
}

.xi-toast-close:hover {
    opacity: 1;
}

/* Animation Styles */

/* Slide Animation */
.xi-toast-slide {
    transform: translateX(100%);
}

.xi-toast-slide.xi-toast-show {
    transform: translateX(0);
}

.xi-toast-top-left .xi-toast-slide,
.xi-toast-bottom-left .xi-toast-slide {
    transform: translateX(-100%);
}

.xi-toast-top-center .xi-toast-slide,
.xi-toast-bottom-center .xi-toast-slide {
    transform: translateY(-100%);
}

.xi-toast-bottom-center .xi-toast-slide {
    transform: translateY(100%);
}

/* Fade Animation */
.xi-toast-fade {
    transform: none;
    opacity: 0;
}

.xi-toast-fade.xi-toast-show {
    opacity: 1;
    transform: none;
}

/* Bounce Animation */
.xi-toast-bounce {
    transform: translateX(100%) scale(0.3);
}

.xi-toast-bounce.xi-toast-show {
    transform: translateX(0) scale(1);
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Zoom Animation */
.xi-toast-zoom {
    transform: translateX(100%) scale(0);
}

.xi-toast-zoom.xi-toast-show {
    transform: translateX(0) scale(1);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .xi-toast-container {
        max-width: calc(100% - 32px);
        left: 16px !important;
        right: 16px !important;
        transform: none !important;
    }

    .xi-toast-top-right,
    .xi-toast-top-left,
    .xi-toast-top-center {
        top: 16px;
    }

    .xi-toast-bottom-right,
    .xi-toast-bottom-left,
    .xi-toast-bottom-center {
        bottom: 16px;
    }

    .xi-toast {
        padding: 14px 16px;
        font-size: 13px;
    }

    .xi-toast-cart-button {
        padding: 4px 8px;
        font-size: 11px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .xi-toast {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }
}

/* Accessibility */
.xi-toast:focus-within {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

/* High Contrast Support */
@media (prefers-contrast: high) {
    .xi-toast {
        border: 2px solid currentColor;
    }

    .xi-toast-cart-button {
        border-width: 2px;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .xi-toast,
    .xi-toast-cart-button {
        transition: none;
    }

    .xi-toast-bounce.xi-toast-show,
    .xi-toast-zoom.xi-toast-show {
        transition: opacity 0.2s ease;
    }
}