/**
 * Toast Notification System
 * Migration-ready: Pure CSS, no WordPress dependencies
 */

/* Toast Container */
.cpt-toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

/* Toast Base */
.cpt-toast {
    min-width: 300px;
    max-width: 400px;
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 12px;
    pointer-events: auto;
    cursor: pointer;
    
    /* Animation */
    animation: slideInRight 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    transform-origin: right;
}

.cpt-toast.removing {
    animation: slideOutRight 0.3s ease-out forwards;
}

/* Toast Types */
.cpt-toast.success {
    background: #10b981;
    color: white;
}

.cpt-toast.error {
    background: #ef4444;
    color: white;
}

.cpt-toast.warning {
    background: #f59e0b;
    color: white;
}

.cpt-toast.info {
    background: #3b82f6;
    color: white;
}

/* Toast Icon */
.cpt-toast-icon {
    font-size: 20px;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Toast Content */
.cpt-toast-content {
    flex: 1;
    min-width: 0;
}

.cpt-toast-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 2px;
}

.cpt-toast-message {
    font-size: 13px;
    opacity: 0.9;
    line-height: 1.4;
}

/* Toast Close Button */
.cpt-toast-close {
    background: none;
    border: none;
    color: white;
    opacity: 0.7;
    cursor: pointer;
    padding: 4px;
    font-size: 18px;
    line-height: 1;
    transition: opacity 0.2s;
    flex-shrink: 0;
}

.cpt-toast-close:hover {
    opacity: 1;
}

/* Progress Bar */
.cpt-toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 0 0 8px 8px;
    animation: shrinkWidth linear;
    transform-origin: left;
}

/* Animations */
@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

@keyframes shrinkWidth {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}

/* Dark Mode Adjustments */
body.dark-mode .cpt-toast {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .cpt-toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
    }
    
    .cpt-toast {
        min-width: auto;
        max-width: none;
        width: 100%;
    }
}