:root {
    --toast-gap: 24px;
    --toast-min-width: 320px;
    --toast-padding: 16px 20px;
}

.woo-toast-container {
    position: fixed;
    z-index: 9999;
    pointer-events: none;
}

.woo-toast {
    display: flex;
    align-items: center;
    gap: 16px;
    background: white;
    padding: var(--toast-padding);
    margin-bottom: 12px;
    min-width: var(--toast-min-width);
    pointer-events: auto;
    animation: wooSlideIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.woo-toast::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: currentColor;
}

@keyframes wooSlideIn {
    from {
        opacity: 0;
        transform: translateX(400px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes wooSlideInLeft {
    from {
        opacity: 0;
        transform: translateX(-400px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes wooSlideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(400px);
    }
}

@keyframes wooSlideOutLeft {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-400px);
    }
}

.woo-toast.removing {
    animation: wooSlideOut 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.woo-toast.success {
    color: #10b981;
}

.woo-toast.info {
    color: #3b82f6;
}

.woo-toast.warning {
    color: #f59e0b;
}

.woo-toast-icon {
    font-size: 20px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.woo-toast-content {
    flex: 1;
    text-align: left;
    min-width: 0;
}

.woo-toast-title {
    font-weight: 600;
    color: #333;
    font-size: 14px;
    margin-bottom: 4px;
    word-break: break-word;
}

.woo-toast-message {
    color: #666;
    font-size: 13px;
    line-height: 1.4;
    word-break: break-word;
}

.woo-toast-close {
    background: none;
    border: none;
    color: #999;
    font-size: 20px;
    cursor: pointer;
    padding: 4px 8px;
    flex-shrink: 0;
    transition: color 0.2s;
    -webkit-tap-highlight-color: transparent;
    border-radius: 4px;
}

.woo-toast-close:hover,
.woo-toast-close:active {
    color: #333;
    background: rgba(0, 0, 0, 0.05);
}

.woo-toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: currentColor;
    animation: wooProgress 4s linear;
}

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

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    :root {
        --toast-gap: 16px;
    }

    .woo-toast {
        min-width: 280px;
        padding: 14px 16px;
        gap: 12px;
    }

    .woo-toast-title {
        font-size: 13px;
    }

    .woo-toast-message {
        font-size: 12px;
    }

    .woo-toast-icon {
        font-size: 18px;
        min-width: 18px;
    }

    .woo-toast-close {
        font-size: 18px;
        padding: 2px 6px;
    }
}

@media (max-width: 480px) {
    :root {
        --toast-gap: 12px;
    }

    .woo-toast-container {
        left: 8px !important;
        right: 8px !important;
        top: 8px !important;
        bottom: auto !important;
    }

    .woo-toast {
        min-width: auto;
        width: 100%;
        max-width: calc(100vw - 16px);
        padding: 12px 14px;
        gap: 10px;
        border-radius: 6px;
    }

    .woo-toast-icon {
        font-size: 16px;
        min-width: 16px;
    }

    .woo-toast-title {
        font-size: 12px;
        margin-bottom: 2px;
    }

    .woo-toast-message {
        font-size: 11px;
        line-height: 1.3;
    }

    .woo-toast-close {
        font-size: 16px;
        padding: 2px 4px;
        min-width: 16px;
        min-height: 16px;
    }

    @keyframes wooSlideIn {
        from {
            opacity: 0;
            transform: translateY(-20px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    @keyframes wooSlideOut {
        from {
            opacity: 1;
            transform: translateY(0);
        }
        to {
            opacity: 0;
            transform: translateY(-20px);
        }
    }
}

/* Landscape mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .woo-toast-container {
        top: 8px !important;
        bottom: auto !important;
    }

    .woo-toast {
        padding: 10px 12px;
        min-width: 250px;
    }

    .woo-toast-title {
        font-size: 12px;
        margin-bottom: 2px;
    }

    .woo-toast-message {
        font-size: 11px;
    }
}

/* High DPI displays */
@media (min-width: 1920px) {
    .woo-toast {
        min-width: 380px;
        padding: 18px 24px;
    }

    .woo-toast-icon {
        font-size: 24px;
    }

    .woo-toast-title {
        font-size: 15px;
    }

    .woo-toast-message {
        font-size: 14px;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    .woo-toast,
    .woo-toast.removing,
    .woo-toast-progress {
        animation: none !important;
        transition: none !important;
    }
}

/* Print styles */
@media print {
    .woo-toast-container {
        display: none;
    }
}