/**
 * 通用弹窗提示组件样式
 */

/* 自定义弹窗样式 */
.custom-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 380px;
    padding: 18px 22px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 4px 16px rgba(0, 0, 0, 0.08);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    transform: translateX(400px);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    opacity: 0;
    backdrop-filter: blur(8px);
}

.custom-toast.show {
    transform: translateX(0);
    opacity: 1;
}

.custom-toast.success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border-left: 4px solid #047857;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.custom-toast.error {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border-left: 4px solid #b91c1c;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.custom-toast.warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    border-left: 4px solid #b45309;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.custom-toast.info {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border-left: 4px solid #1d4ed8;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.custom-toast.confirm {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    color: white;
    border-left: 4px solid #374151;
    border: 1px solid rgba(107, 114, 128, 0.2);
}

.custom-toast .toast-content {
    display: flex;
    align-items: center;
    gap: 14px;
}

.custom-toast .toast-icon {
    font-size: 20px;
    flex-shrink: 0;
    opacity: 0.9;
}

.custom-toast .toast-message {
    flex-grow: 1;
    font-size: 15px;
    letter-spacing: 0.2px;
}

.custom-toast .toast-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: all 0.2s ease;
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-toast .toast-close:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    transform: scale(1.1);
}

/* 确认对话框样式 */
.custom-toast.confirm .toast-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
}

.custom-toast.confirm .toast-message {
    margin-bottom: 8px;
}

.custom-toast .toast-actions {
    display: flex;
    gap: 12px;
    width: 100%;
    justify-content: flex-end;
}

.custom-toast .toast-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 60px;
}

.custom-toast .toast-btn-cancel {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.custom-toast .toast-btn-cancel:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.custom-toast .toast-btn-confirm {
    background: rgba(255, 255, 255, 0.9);
    color: #374151;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.custom-toast .toast-btn-confirm:hover {
    background: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* 弹窗动画 */
@keyframes slideInRight {
    from {
        transform: translateX(400px) scale(0.8);
        opacity: 0;
    }
    to {
        transform: translateX(0) scale(1);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0) scale(1);
        opacity: 1;
    }
    to {
        transform: translateX(400px) scale(0.8);
        opacity: 0;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .custom-toast {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
        transform: translateY(-100px);
    }
    
    .custom-toast.show {
        transform: translateY(0);
    }
    
    .custom-toast .toast-actions {
        flex-direction: column;
    }
    
    .custom-toast .toast-btn {
        width: 100%;
    }
}
