/* Modern Toast Notification System */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 400px;
    width: 100%;
}

.modern-toast {
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    margin-bottom: 10px;
    padding: 16px 20px;
    position: relative;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 4px solid #007bff;
    max-width: 400px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.modern-toast.show {
    transform: translateX(0);
    opacity: 1;
}

.modern-toast.success {
    border-left-color: #28a745;
    background: linear-gradient(135deg, #f8fff9 0%, #ffffff 100%);
}

.modern-toast.danger,
.modern-toast.error {
    border-left-color: #dc3545;
    background: linear-gradient(135deg, #fff8f8 0%, #ffffff 100%);
}

.modern-toast.warning {
    border-left-color: #ffc107;
    background: linear-gradient(135deg, #fffef7 0%, #ffffff 100%);
}

.modern-toast.info {
    border-left-color: #17a2b8;
    background: linear-gradient(135deg, #f7fcfd 0%, #ffffff 100%);
}

.toast-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.toast-icon {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 12px;
    font-weight: bold;
    color: white;
}

.toast-icon.success {
    background-color: #28a745;
}

.toast-icon.danger,
.toast-icon.error {
    background-color: #dc3545;
}

.toast-icon.warning {
    background-color: #ffc107;
    color: #000;
}

.toast-icon.info {
    background-color: #17a2b8;
}

.toast-title {
    font-weight: 600;
    font-size: 14px;
    color: #2c3e50;
    text-transform: capitalize;
}

.toast-close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #6c757d;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.toast-close:hover {
    background-color: #f8f9fa;
    color: #495057;
}

.toast-message {
    font-size: 13px;
    line-height: 1.4;
    color: #495057;
    margin: 0;
    white-space: pre-wrap;
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 0 0 12px 12px;
    overflow: hidden;
}

.toast-progress-bar {
    height: 100%;
    width: 100%;
    transform: translateX(-100%);
    transition: transform linear;
}

.toast-progress-bar.success {
    background-color: #28a745;
}

.toast-progress-bar.danger,
.toast-progress-bar.error {
    background-color: #dc3545;
}

.toast-progress-bar.warning {
    background-color: #ffc107;
}

.toast-progress-bar.info {
    background-color: #17a2b8;
}

/* Animations */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Responsive Design */
@media (max-width: 576px) {
    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .modern-toast {
        max-width: none;
    }
}

/* Dark theme support */
@media (prefers-color-scheme: dark) {
    .modern-toast {
        background: #2c3e50;
        color: #ecf0f1;
    }
    
    .modern-toast.success {
        background: linear-gradient(135deg, #1e3a28 0%, #2c3e50 100%);
    }
    
    .modern-toast.danger,
    .modern-toast.error {
        background: linear-gradient(135deg, #3a1e1e 0%, #2c3e50 100%);
    }
    
    .modern-toast.warning {
        background: linear-gradient(135deg, #3a3a1e 0%, #2c3e50 100%);
    }
    
    .modern-toast.info {
        background: linear-gradient(135deg, #1e3a3a 0%, #2c3e50 100%);
    }
    
    .toast-title {
        color: #ecf0f1;
    }
    
    .toast-message {
        color: #bdc3c7;
    }
}