/* WooCommerce Toast Notifications - Tailwind Style */

/* Toast Container */
#rubikto-toast-container {
    position: fixed;
    left: 20px;
    bottom: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column-reverse;
    gap: 12px;
    max-width: 400px;
    pointer-events: none;
}

/* Toast Base */
.rubikto-toast {
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border-left: 4px solid #3b82f6;
    animation: slideInLeft 0.3s ease-out;
    transition: all 0.3s ease;
    max-width: 100%;
    direction: rtl;
}

.rubikto-toast:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.rubikto-toast.hiding {
    animation: slideOutLeft 0.3s ease-out forwards;
}

/* Toast Types */
.rubikto-toast.success {
    border-left-color: #10b981;
}

.rubikto-toast.error {
    border-left-color: #ef4444;
}

.rubikto-toast.warning {
    border-left-color: #f59e0b;
}

.rubikto-toast.info {
    border-left-color: #3b82f6;
}

/* Toast Icon */
.rubikto-toast-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.rubikto-toast.success .rubikto-toast-icon {
    background: #d1fae5;
    color: #10b981;
}

.rubikto-toast.error .rubikto-toast-icon {
    background: #fee2e2;
    color: #ef4444;
}

.rubikto-toast.warning .rubikto-toast-icon {
    background: #fef3c7;
    color: #f59e0b;
}

.rubikto-toast.info .rubikto-toast-icon {
    background: #dbeafe;
    color: #3b82f6;
}

/* Toast Content */
.rubikto-toast-content {
    flex: 1;
    min-width: 0;
}

.rubikto-toast-title {
    font-weight: 600;
    font-size: 14px;
    color: #111827;
    margin: 0 0 4px 0;
    line-height: 1.4;
}

.rubikto-toast-message {
    font-size: 13px;
    color: #6b7280;
    margin: 0;
    line-height: 1.5;
    word-wrap: break-word;
}

/* Toast Close Button */
.rubikto-toast-close {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
    padding: 0;
    font-size: 18px;
    line-height: 1;
}

.rubikto-toast-close:hover {
    background: #f3f4f6;
    color: #4b5563;
}

/* Progress Bar */
.rubikto-toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 0 0 8px 8px;
    overflow: hidden;
}

.rubikto-toast-progress-bar {
    height: 100%;
    background: currentColor;
    transition: width linear;
}

.rubikto-toast.success .rubikto-toast-progress-bar {
    background: #10b981;
}

.rubikto-toast.error .rubikto-toast-progress-bar {
    background: #ef4444;
}

.rubikto-toast.warning .rubikto-toast-progress-bar {
    background: #f59e0b;
}

.rubikto-toast.info .rubikto-toast-progress-bar {
    background: #3b82f6;
}

/* Animations */
@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

/* Hide default WooCommerce notices */
.woocommerce-message,
.woocommerce-error,
.woocommerce-info,
.woocommerce-notices-wrapper .woocommerce-message,
.woocommerce-notices-wrapper .woocommerce-error,
.woocommerce-notices-wrapper .woocommerce-info {
    display: none !important;
}

/* Responsive */
@media (max-width: 640px) {
    #rubikto-toast-container {
        left: 10px;
        right: 10px;
        bottom: 10px;
        max-width: calc(100% - 20px);
    }
    
    .rubikto-toast {
        padding: 12px;
        font-size: 13px;
    }
    
    .rubikto-toast-title {
        font-size: 13px;
    }
    
    .rubikto-toast-message {
        font-size: 12px;
    }
}
