/**
 * Toast Notification System
 * DSP360 System
 */

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 400px;
    pointer-events: none;
}

.toast {
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    padding: 1rem 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    pointer-events: auto;
    animation: toastSlideIn 0.3s ease-out;
    border-left: 4px solid;
    min-width: 300px;
    max-width: 100%;
}

.toast.fade-out {
    animation: toastSlideOut 0.3s ease-in forwards;
}

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

.toast-content {
    flex: 1;
    min-width: 0;
}

.toast-title {
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
    color: var(--text-color);
}

.toast-message {
    font-size: 0.875rem;
    color: var(--text-color);
    line-height: 1.5;
}

.toast-close {
    flex-shrink: 0;
    background: none;
    border: none;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    color: var(--secondary-color);
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
}

.toast-close:hover {
    color: var(--text-color);
}

/* Toast Types */
.toast-success {
    border-left-color: var(--success-color);
}

.toast-success .toast-icon {
    color: var(--success-color);
}

.toast-error {
    border-left-color: var(--error-color);
}

.toast-error .toast-icon {
    color: var(--error-color);
}

.toast-warning {
    border-left-color: var(--warning-color);
}

.toast-warning .toast-icon {
    color: var(--warning-color);
}

.toast-info {
    border-left-color: var(--info-color);
}

.toast-info .toast-icon {
    color: var(--info-color);
}

/* Confirmation Modal */
.confirm-modal {
    display: none;
    position: fixed;
    z-index: 10001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.confirm-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.confirm-modal-content {
    background-color: white;
    padding: 2rem;
    border-radius: 0.5rem;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    animation: modalFadeIn 0.2s ease-out;
}

.confirm-modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-color);
}

.confirm-modal-message {
    font-size: 0.875rem;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.confirm-modal-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

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

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

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .toast {
        min-width: auto;
    }
    
    .confirm-modal-content {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .confirm-modal-actions {
        flex-direction: column;
    }
    
    .confirm-modal-actions .btn {
        width: 100%;
    }
}
