/**
 * Hisense Toast Notification Styles
 * 
 * @package TwentyTwenty Child
 * @since 1.0.0
 */

/* Toast Container */
.hisense-toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    pointer-events: none;
    max-width: 400px;
    width: 100%;
}

/* Toast Base Styles */
.hisense-toast {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    margin-bottom: 12px;
    overflow: hidden;
    pointer-events: auto;
    position: relative;
    transform: translateX(100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    border-left: 4px solid transparent;
    max-width: 100%;
}

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

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

/* Toast Content */
.toast-content {
    padding: 16px;
    position: relative;
}

.toast-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 8px;
}

.toast-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

.toast-message {
    flex: 1;
    font-size: 14px;
    line-height: 1.4;
    color: #333;
    font-weight: 500;
}

.toast-close {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

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

/* Product Info */
.toast-product-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 8px 0;
    padding: 8px 0;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.toast-product-image {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.toast-product-name {
    font-size: 13px;
    color: #666;
    flex: 1;
}

/* Toast Actions */
.toast-actions {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    gap: 8px;
}

.toast-btn {
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
}

.toast-btn-primary {
    background: #00d4aa;
    color: #fff;
    border-color: #00d4aa;
}

.toast-btn-primary:hover {
    background: #00c299;
    border-color: #00c299;
    color: #fff;
    text-decoration: none;
}

.toast-btn-secondary {
    background: transparent;
    color: #666;
    border-color: #ddd;
}

.toast-btn-secondary:hover {
    background: #f8f9fa;
    color: #333;
    text-decoration: none;
}

/* Progress Bar */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    width: 100%;
    transform-origin: left;
    animation: toastProgress 4s linear forwards;
}

@keyframes toastProgress {
    from {
        transform: scaleX(1);
    }
    to {
        transform: scaleX(0);
    }
}

/* Toast Types */
.hisense-toast--success {
    border-left-color: #28a745;
}

.hisense-toast--success .toast-icon {
    color: #28a745;
}

.hisense-toast--success .toast-progress {
    background: #28a745;
}

.hisense-toast--error {
    border-left-color: #dc3545;
}

.hisense-toast--error .toast-icon {
    color: #dc3545;
}

.hisense-toast--error .toast-progress {
    background: #dc3545;
}

.hisense-toast--warning {
    border-left-color: #ffc107;
}

.hisense-toast--warning .toast-icon {
    color: #ffc107;
}

.hisense-toast--warning .toast-progress {
    background: #ffc107;
}

.hisense-toast--info {
    border-left-color: #17a2b8;
}

.hisense-toast--info .toast-icon {
    color: #17a2b8;
}

.hisense-toast--info .toast-progress {
    background: #17a2b8;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .hisense-toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .hisense-toast {
        margin-bottom: 8px;
    }
    
    .toast-content {
        padding: 12px;
    }
    
    .toast-message {
        font-size: 13px;
    }
    
    .toast-actions {
        flex-direction: column;
    }
    
    .toast-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hisense-toast-container {
        top: 5px;
        right: 5px;
        left: 5px;
    }
    
    .toast-product-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .toast-product-image {
        width: 35px;
        height: 35px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .hisense-toast {
        background: #2d3748;
        color: #e2e8f0;
    }
    
    .toast-message {
        color: #e2e8f0;
    }
    
    .toast-close {
        color: #a0aec0;
    }
    
    .toast-close:hover {
        background: rgba(255, 255, 255, 0.1);
        color: #e2e8f0;
    }
    
    .toast-product-info {
        border-top-color: rgba(255, 255, 255, 0.1);
    }
    
    .toast-actions {
        border-top-color: rgba(255, 255, 255, 0.1);
    }
    
    .toast-product-name {
        color: #a0aec0;
    }
    
    .toast-btn-secondary {
        color: #a0aec0;
        border-color: #4a5568;
    }
    
    .toast-btn-secondary:hover {
        background: #4a5568;
        color: #e2e8f0;
    }
}

/* Animation Enhancements */
.hisense-toast {
    animation: slideInRight 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Hover Effects */
.hisense-toast:hover .toast-progress {
    animation-play-state: paused;
}

.hisense-toast:not(:hover) .toast-progress {
    animation-play-state: running;
}

/* Hide WooCommerce "View cart" links */
.added_to_cart[title="View cart"],
a.added_to_cart.wc-forward,
a[title="View cart"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}
