/* Global Toast/Popup Notification System */

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-width: 300px;
    max-width: 420px;
    padding: 16px 20px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    transform: translateX(120%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    pointer-events: all;
    border-left: 4px solid #333;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast.hide {
    transform: translateX(120%);
    opacity: 0;
}

/* Toast Types */
.toast.success {
    border-left-color: #4CAF50;
    background: linear-gradient(135deg, #ffffff 0%, #f0fff0 100%);
}

.toast.error {
    border-left-color: #f44336;
    background: linear-gradient(135deg, #ffffff 0%, #fff5f5 100%);
}

.toast.warning {
    border-left-color: #ff9800;
    background: linear-gradient(135deg, #ffffff 0%, #fffaf0 100%);
}

.toast.info {
    border-left-color: #2196F3;
    background: linear-gradient(135deg, #ffffff 0%, #f0f8ff 100%);
}

/* Toast Icon */
.toast-icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #fff;
}

.toast.success .toast-icon {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
}

.toast.error .toast-icon {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
}

.toast.warning .toast-icon {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
}

.toast.info .toast-icon {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
}

/* Toast Content */
.toast-content {
    flex: 1;
    min-width: 0;
}

.toast-title {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a2e;
    margin: 0 0 4px 0;
}

.toast-message {
    font-size: 13px;
    color: #666;
    margin: 0;
    line-height: 1.4;
    word-wrap: break-word;
}

/* Toast Close Button */
.toast-close {
    flex-shrink: 0;
    background: none;
    border: none;
    color: #999;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s;
    margin-left: 8px;
}

.toast-close:hover {
    color: #333;
}

/* Progress Bar */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 0 0 0 12px;
    transition: width linear;
}

.toast.success .toast-progress {
    background: #4CAF50;
}

.toast.error .toast-progress {
    background: #f44336;
}

.toast.warning .toast-progress {
    background: #ff9800;
}

.toast.info .toast-progress {
    background: #2196F3;
}

/* Confirm Dialog */
.confirm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.confirm-dialog {
    width: 100%;
    max-width: 440px;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

.confirm-header {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 16px 18px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.confirm-badge {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
}

.confirm-badge.warning { background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%); }
.confirm-badge.error { background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%); }
.confirm-badge.success { background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%); }
.confirm-badge.info { background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%); }

.confirm-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #1a1a2e;
}

.confirm-body {
    padding: 14px 18px 18px 18px;
}

.confirm-message {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: #555;
}

.confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 12px 18px 18px 18px;
}

.confirm-btn {
    border: none;
    border-radius: 10px;
    padding: 10px 14px;
    font-weight: 600;
    cursor: pointer;
}

.confirm-btn.cancel {
    background: #f2f3f5;
    color: #333;
}

.confirm-btn.confirm {
    background: #1a1a2e;
    color: #fff;
}

.confirm-btn.confirm.warning { background: #ff9800; }
.confirm-btn.confirm.error { background: #f44336; }
.confirm-btn.confirm.success { background: #4CAF50; }
.confirm-btn.confirm.info { background: #2196F3; }

.confirm-btn:focus {
    outline: 2px solid rgba(33, 150, 243, 0.35);
    outline-offset: 2px;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .toast-container {
        top: auto;
        bottom: 20px;
        left: 10px;
        right: 10px;
    }
    
    .toast {
        min-width: auto;
        max-width: 100%;
        transform: translateY(120%);
    }
    
    .toast.show {
        transform: translateY(0);
    }
    
    .toast.hide {
        transform: translateY(120%);
    }
}
